MsgSetGroupReceiveMessageOpt

introduction

Set group receiving message option

Set group receiving message option, you may check on GroupBaseInfo.

Any group member can call the MsgSetGroupReceiveMessageOpt API to modify the group message receiving option. Available group message receiving options are as follows:

TIMReceiveMessageOpt.kTIMRecvMsgOpt_Receive: messages will be received when the user is online, and push notifications will be received when the user is offline.

TIMReceiveMessageOpt.kTIMRecvMsgOpt_Not_Receive: no group messages will be received.

TIMReceiveMessageOpt.kTIMRecvMsgOpt_Not_Notify: messages will be received when the user is online, and no push notification will be received when the user is offline.

Parameter details

overload1

Parameter name Parameter type Required Description
group_id string Required group ID
opt TIMReceiveMessageOpt Required Receiving message option
callback NullValueCallback Required Asynchronous callback

overload2

Parameter name Parameter type Required Description
group_id string Required group ID
opt TIMReceiveMessageOpt Required Receiving message option
callback ValueCallback< string > Required Asynchronous callback The format of json_param in the return value is string

Returned template

TIMResult

The parameters of the callback function after successfully calling the API:
code:int
desc:string
json_param:'' // json_ Params is an empty string ""
user_data:string

Return value details

name type description
TIMResult TIMResult Return value of calling API
code int Result error code: Error Codes
desc string The description of the error.
json_param string Json string. Calling different API will get different Json strings.
user_data string User-defined data transfered by ImSDK without any processing

results matching ""

    No results matching ""