Closed AntzCode closed 4 years ago
This functionality belongs to the core components (OssnChat and OssnMessages). The theme does not have enough control over those components to make the changes that are requested here.
Advice is to contact the owners of OssnChat and OssnMessages and request the enhancement, or develop alternative components.
I have created a patch to resolve this issue. Although the patch resolves the issue now, it will probably need to be re-applied after upgrading the platform core.
Read how to apply GIT patches here: https://www.devroom.io/2009/10/26/how-to-create-and-apply-a-patch-with-git/#applying-the-patch
Download the patch here: chat-messages-get-lost-if-there-is-more-than-one-window-open.patch.zip
If I am logged in on the desktop and the mobile, and I am having a chat conversation with another person, then sometimes the person's reply is delivered to the desktop but not the mobile or vice-versa.
It seems to be because AJAX is polling the server for new messages, and when the server responds, then the server removes the message from the queue for future polling.
It should be that the chat window sends the timestamp or id of the last message it has, then the server will return all messages that have been created in the conversation after that timestamp. That way, the mobile and the desktop will both be updated with the most recent messages even if it has already been collected by the other.