Hello,
We are again experiencing issues with the unread message counter - we are using the APIs to get the unread messages and then are just counting them (we decided to go this route vs the SDK option, because for a long time this was the most reliable option, the SDK functionality was not working as expected).
Error Scenario #1:
- user 2 is not online
- user 1 calls user 2, but because no one is picking up user 1 cancels the call
- user 2 logs into the app and we expect to see 2 unread messages but sees nothing - the CometChat Api returns an empty array of messages
NOTE: If a user has no unread messages and misses calls, the API will return nothing for all of those missed calls, regardless of how many missed calls there are (be it 1 or be it 6)
Error Scenario #2:
- user 2 is not online
- user 1 calls user 2, but because no one is picking up user 1 cancels the call
- user 2 logs in, goes in the chat area (without entering the conversation, so the “mark message as read” is not triggered) and sees no unread messages (up until this point this is Scenario #1) although there should be messages (the CometChat Api returns an empty array)
- user 1 send a message to user 2
- now all of the sudden user 2 sees unread messages - 3 to be exact for this test (so the expected number, 2 for the call and 1 for the actual message)
NOTE: if the user has no unread messages, but receives calls that are missed, there will be no indicator of the missed calls until an actual text message is sent, when the text message is sent all of the missed calls are returned as well (so if the user has 6 missed call, the unread message array is empty but when the first unread message is received the array will have 13 items = 6*2 for the calls + 1 for the text message)
This item is related to this one https://forum.cometchat.com/t/unread-messages-counter-problem-on-all-plaforms/2436 (for additional details about the used API and SDKs)
Best regards,
Mihaela