SDKsWASM
Check group membership
Check whether the current user has joined a selected group.
const { data: isJoined } = await openimsdk.isJoinGroup(groupID);groupID is the target group ID.
After the Promise succeeds, data is a Boolean indicating whether the current user has joined the group. The query establishes a snapshot only and does not trigger a group event.
To maintain membership continuously, also handle the join, leave, and dismissal events on Group overview, and query again after reconnection or an important operation.
Was this page helpful?