getGroupOnlineMemberCount
Introduction
Get the online member count for a specific group.
Only works with AVChatRoom temporarily.
The call rate of method is limited to once in 60 seconds for SDK level.
Parameter details
Parameter name | Parameter type | Required | Description |
---|---|---|---|
groupID | string | yes | The group ID of the group. |
Returned template
V2TimValueCallback<number>
{
code : number
desc : string
data : number
}
Return value details
name | type | description |
---|---|---|
code | number | Request result: Error codes. 0 means success. |
desc | string | The description of the error. It will be empty if success. |
data | number | The online member count returned. |
Code example
import { TencentImSDKPlugin } from 'react-native-tim-js';
const getGroupOnlineMemberCountRes = await TencentImSDKPlugin.v2TIMManager
.getGroupManager()
.getGroupOnlineMemberCount('groupID');
if (getGroupOnlineMemberCountRes.code === 0) {
getGroupOnlineMemberCountRes.data;
}