1. Can I receive my own messages in the listener?
When others successfully send messages to your device, you’ll receive them in the message listener. So, the listener only picks up messages from other users. For messages you send, check the send success callback.
2. Why can I receive my own messages in the listener with multi-device login?
If you’re logged in on multiple devices, the same account on other devices will receive the message in the listener. This happens because enabling Multi-device Message Synchronization causes the server to sync the message to other devices, and it’s also delivered to the listener.
3. Why do I receive the same messages again after switching devices or clearing cache login?
Clearing all browser cache also clears the inbox/outbox timestamp used internally by the SDK, causing it to pull offline compensation messages again.
If you need to clear localStorage, only clear the keys within your project to avoid affecting third-party business logic.