AI Integration Quick Reference
AI Integration Quick Reference
Add Members to Group
UseaddMembersToGroup() to add members to a Group.
In order to add members, you need to create an object of the
GroupMember class. The UID and the scope of the GroupMember are mandatory.
- Dart
Response
Response
On Success — A
Map<String?, String?> where each key is the UID of the user and the value is either "success" or an error message:Error
Error
onSuccess() callback, you will receive a Map which will contain the UID of the users and the value will either be success or an error message describing why the operation to add the user to the group failed.
Real-Time Group Member Added Events
When a group member is added by another member, this event is triggered. When a user joins a group on their own, the joined event is triggered.
onMemberAddedToGroup() in GroupListener to receive real-time notifications when members are added.
- Dart
Missed Member Added Events
When you retrieve the list of previous messages, if a member has been added to any group that the logged-in user is a member of, the list of messages will contain anAction message. An Action message is a sub-class of BaseMessage class.
For the group member added event, in the Action object received, the following fields can help you get the relevant information:
Next Steps
Kick & Ban Members
Remove or ban members from a group
Change Member Scope
Promote or demote group members
Retrieve Group Members
Fetch the list of members in a group
Join a Group
Allow users to join public or password-protected groups