Hi CometChat Team!
I am using markAsRead method for marking the messages as read and it is working okay. However, if the app launches by push notification:
- Init the CometChat
- Login the user
- Fetch the messages from the sender (using the payload of push notification)
- Get the message id of the last message and use it to mark as read
I was able to fetch the messages successfully, however, even I called the markAsRead method, the message doesn’t mark as read. I tried to delay (for 5 seconds) the calling of markAsRead method after loading the messages and it works fine.
That said, is there anything I can check to fix this? It looks calling the markAsRead right after initializing the CometChat SDK has something to do with this?