setTopicInfo
Introduction
Set the topic info and attributes.
Community group only works with Ultimate Edition, you can see the pricing plan here.
Parameter details
Parameter name | Parameter type | Required | Description |
---|---|---|---|
topicInfo | V2TimTopicInfo | yes | The information needs to be modified and set. |
groupID | string | yes | The ID of the group that this topic is associated with. |
Returned template
V2TimCallback
{
code : number
desc : string
}
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. |
Code example
import { TencentImSDKPlugin, V2TimTopicInfo } from 'react-native-tim-js';
const topicInfo: V2TimTopicInfo = {
customString: '',
draftText: '',
groupAtInfoList: [],
introduction: '',
isAllMute: false,
lastMessage: undefined,
notification: '',
selfMuteTime: 0,
topicFaceUrl: '',
topicID: '',
topicName: '',
unreadCount: 0,
};
const setTopicInfoRes = await TencentImSDKPlugin.v2TIMManager
.getGroupManager()
.setTopicInfo(
'groupID',
topicInfo
);
if (setTopicInfoRes.code === 0) {
}