-->

XMPP多个标签同步发送消息(XMPP Multiple tabs synchronize sent

2019-10-17 14:34发布

我实现在一个网站Strophe.js的Openfire的聊天客户端。 我设法得到多个会话和多个窗口需要刷新页面并重新连接回来。 现在我已经恢复了聊天记录的挑战。 但是,第一个问题我被困当用户打开我们的网站的两个标签会创建一个与不同的资源ID的两位XMPP会话的,但现在说a@example.com/tab1发送给朋友这一点应在TAB2同步消息

例如,如果你从GTALK用户发送聊天消息发送的邮件将被更新,并在Gmail中的聊天窗口舒。

任何人有任何想法。 非常感谢你的时间和帮助。

Answer 1:

The routing logic for multiple resources is up to the server implementation. The GTalk server routes messages sent to bare Jids to all connected resources. Many other servers (also Openfire) send messages to bare Jids to the most available resource, which is the one with the highest priority.

If each of your tabs has its own resource then I suggest to send the messages to each resource (full jid) manual. You get all connected resources of your subscribed contacts with the presence.



Answer 2:

就在这里。 看看XEP-0280:信息碳( http://xmpp.org/extensions/xep-0280.html )

无论你的客户以及你的服务器必须支持它以全面工作。

来源: https://superuser.com/questions/866785/is-there-a-way-to-sync-xmpp-messages-across-different-devices-with-standard-xmp



文章来源: XMPP Multiple tabs synchronize sent message