I am utilising
onMessagesAdded event from
setMessageCollectionHandler to handle showing new messages in message list view.
However, I realise if user navigate in & out of chatrooms too fast (where setMessageCollectionHandler is called for each chatroom on each enter), when (s)he tries to send a message in the chatroom, (s)he could receive two or more times
onMessageAdded event trigger.
I suspect there’s some kind of race condition inside your setMessageCollectionHandler and ultimately didn’t manage to dispose the old handler before setting a new one on the same chatroom - ending up with two or more handlers listening to the same event and dispatching the same actions multiple times.
Sendbird Version - v3.1.17