setLocalCustomInt
Introduction
Set the custom data for a given message on local, in int.
The data created by this method will only stored in local, while not sent to other users, and will lost after re-installing.
Parameter details
Parameter name | Parameter type | Required | Description |
---|---|---|---|
messageID | string | yes | The msgId of the message. |
localCustomInt | number | yes | The custom data in int for the message. |
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 } from 'react-native-tim-js';
const setLocalCustomIntRes = await TencentImSDKPlugin.v2TIMManager
.getMessageManager()
.setLocalCustomInt(
'msgID',
0
);
if (setLocalCustomIntRes.code === 0) {
}