TIMSetConvUnreadMessageCountChangedByFilterCallback

Introduction

Set the callback for changing the total number of unread messages filtered by the session filter

You can call subscribeUnreadMessageCountByFilter to register and monitor changes in the total number of unread messages under the specified filter, and the SDK will notify you of the latest total number of unread messages through this callback. - You can register to monitor the total number of unread changes under multiple different filters. The filter parameter of this callback is the filter specified when registering the monitor. The filter carries three fields:kTIMConversationListFilterConvType, kTIMConversationListFilterMarkType, and kTIMConversationListFilterGroupName. By judging whether these three fields are all The same, to distinguish different filters. - The unread total is subtracted from the unread count for sessions set to Do Not Disturb, that is, sessions with the message receive option set to kTIMRecvMsgOpt_Not_Receive or kTIMRecvMsgOpt_Not_Notify.

Parameter details

Parameter name Parameter type Required Description
params convUnreadMessageCountChangedByFilterCallbackParam yes param

Returned template

void

Return value details

This function has no return value

Code example

import TimRender from "im_electron_sdk/dist/renderer";
const timRenderInstance = new TimRender();

let param:convUnreadMessageCountChangedByFilterCallbackParam = {
    user_data:"",
    callback:(...args)=>{
        console.log(args)
    }
}
timRenderInstance.TIMSetConvUnreadMessageCountChangedByFilterCallback(param)

results matching ""

    No results matching ""