setC2CReceiveMessageOpt
Introduction
Set the message receiving option for c2c messages from several users.
This method supports batch setting, you can set up to 30 users once.
The limit on rate for this method is at 5 times a second.
The receiving options can referring to ReceiveMsgOptEnum.
Parameter details
Parameter name | Parameter type | Required | Platform | Description |
---|---|---|---|---|
userIDList | List< String > | yes | All | The user ID list. |
opt | ReceiveMsgOptEnum | yes | All | The message receiving option. |
Returned template
V2TimCallback
{
code : int
desc : String
}
Return value details
name | type | description |
---|---|---|
code | int | Request result: Error codes. 0 means success. |
desc | String | The description of the failure. |
Code example
V2TimCallback setC2CReceiveMessageOptRes = await TencentImSDKPlugin
.v2TIMManager
.getMessageManager()
.setC2CReceiveMessageOpt(
userIDList: ['user1', 'user2'],
opt: ReceiveMsgOptEnum.V2TIM_NOT_RECEIVE_MESSAGE);
if (setC2CReceiveMessageOptRes.code == 0) {
}