Browse SDKs · React Native
Platform
SDKsReact Native

Check group membership

Check whether the current account is a member of a specified group using the OpenIM React Native SDK.

Copy

Check whether the current login account belongs to a designated group:

const isJoined = await OpenIMSDK.isJoinGroup('group-001');

Parameters

ParameterTypeRequiredDescription
groupIDstringYesTarget group ID to check.

Return value

A resolved Promise returns a boolean: true indicates that the current account is an active member of the group, and false indicates that the account has not joined or has left the group. This check returns a point-in-time local snapshot; for real-time updates on group membership status, subscribe to group events documented in Group overview.