Cannot find name 'hideMessagesFromBlockedUsers'

We are using the following method to get unread message count.

CometChat.getUnreadMessageCountForAllGroups()

When we try to add the ‘hideMessagesFromBlockedUsers’ parameter

Angular says" Cannot find name ‘hideMessagesFromBlockedUsers’.ts(2304)"

CometChat version: “@cometchat-pro/cordova-ionic-chat”: “^2.3.1”,

Hello @kl2000,

CometChat.getUnreadMessageCountForAllGroups() accepts an optional parameter hideMessagesFromBlockedUsers which should be a boolean.

If you wish to hide messages of blocked users then you need to pass true else you can ignore this parameter since the default value is false.

Hope this solves your issue.

Warm Regards,

CometChat Pro
Mayur Bhandari

Hi Mayur, is this the correct way to use it? No matter how we try to add the parameter, angular gives us issue.

When I try to add

CometChat.getUnreadMessageCountForAllGroups(hideMessagesFromBlockedUsers: true).then()

Sorry, here is better screenshot.

Hello @kl2000,

Just pass true to the method.

CometChat.getUnreadMessageCountForAllGroups(true)

Warm Regards,

CometChat Pro
Mayur Bhandari

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.