Documentation Index
Fetch the complete documentation index at: https://www.cometchat.com/docs/llms.txt
Use this file to discover all available pages before exploring further.
AI Integration Quick Reference
AI Integration Quick Reference
Change Scope of a Group Member
UseupdateGroupMemberScope() to change a member’s role within a Group.
- Dart
| Parameter | Type | Description |
|---|---|---|
guid | String | The GUID of the group for which the member’s scope needs to be changed |
uid | String | The UID of the member whose scope you would like to change |
scope | String | The updated scope: CometChatMemberScope.admin, CometChatMemberScope.moderator, or CometChatMemberScope.participant |
onSuccess | Function(String) | Callback triggered on successful scope change |
onError | Function(CometChatException) | Callback triggered on error |
participant. Only the Admin of the group can change the scope of any participant in the group.
Response
Response
On Success — A
String message confirming the scope change:| Parameter | Type | Description | Sample Value |
|---|---|---|---|
message | string | Success confirmation message | "cometchat-guid-1 scope changed successfully" |
Error
Error
| Parameter | Type | Description | Sample Value |
|---|---|---|---|
code | string | Error code identifier | "ERR_NOT_A_MEMBER" |
message | string | Human-readable error message | "The user is not a member of this group." |
details | string | Additional technical details | "Cannot change scope for a user who is not a member of the group." |
Real-Time Group Member Scope Changed Events
ImplementonGroupMemberScopeChanged() in GroupListener to receive real-time notifications when a member’s scope changes.
- Dart
Missed Group Member Scope Changed Events
When fetching previous messages, scope changes appear as Action messages (a subclass ofBaseMessage).
Next Steps
Transfer Group Ownership
Transfer ownership of a group to another member
Kick & Ban Members
Remove or ban members from a group
Add Members
Add new members to a group
Retrieve Group Members
Fetch the list of members in a group