setGroupReceiveMessageOpt

Introduction

Set the message receiving option for group messages from a specified group.

The receiving options can referring to ReceiveMsgOptEnum.

Parameter details

Parameter name Parameter type Required Description
groupID string yes The group ID.
opt ReceiveMsgOptEnum yes The message receiving option.

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, ReceiveMsgOptEnum } from 'react-native-tim-js';


const setGroupReceiveMessageOptRes = await TencentImSDKPlugin.v2TIMManager
    .getMessageManager()
    .setGroupReceiveMessageOpt(
        'groupID',
        ReceiveMsgOptEnum.V2TIM_NOT_RECEIVE_MESSAGE
    );
if (setGroupReceiveMessageOptRes.code === 0) {

}

results matching ""

    No results matching ""