SDKsFlutter
Invite users to a group
Invite users to a group with the OpenIM Flutter SDK.
inviteUserToGroup() invites a list of users to one group. The client can control the UI entry point based on the current member's role, but OpenIMServer performs the final permission check.
await OpenIM.iMManager.groupManager.inviteUserToGroup(
groupID: groupID,
reason: 'Join the project discussion',
userIDList: selectedUserIDs,
);groupID, reason, and userIDList identify the target group, invitation note, and target users. A successful Future means that the server handled the invitation request; it does not mean every target user's state has updated on every client.
Relevant clients may subsequently receive a member-added event or application change. Do not treat event arrival as completion of this Future. See Group member queries overview for merge rules.
Was this page helpful?