message listeners are getting called multiple times after new message arrives
Describe the problem
listeners getting called twice after each message arrives and leading to calling the api's twice
What was the expected behavior?
listeners should be called only once for each message
Reproduction
const messageListener = 'messageListener'; CometChat.addMessageListener( messageListener, new CometChat.MessageListener({ onTextMessageReceived: (textMessage) => { console.log('message listener'); this.playAudio(textMessage); this.updateDataOnMessageReceived(textMessage); }, onMediaMessageReceived: (mediaMessage) => { this.playAudio(mediaMessage); this.updateDataOnMessageReceived(mediaMessage); }, }), )
Environment
Please provide the following:
- **Version used:2.1.1
- Other modules/plugins/libraries that might be involved:
Hello @mannenikhil,
You are using a very old version. Please try updating the SDK to the latest version v2.3.6. Please let us know if this solves your issue.
Hi @mannenikhil,
Hope the issue has been resolved post upgrading. If you need further help with this, please feel free to write to [email protected].
Regards, Provesha