conversejs / converse.js

Web-based XMPP/Jabber chat client written in JavaScript
http://conversejs.org
Mozilla Public License 2.0
3.06k stars 763 forks source link

works if open multiple tabs in same browser? #170

Closed bill2004158 closed 10 years ago

bill2004158 commented 10 years ago

if user open multiple tabs in same browser, does it mean the tabs should same rid? does this project works for such case?

bill2004158 commented 10 years ago

and it seems the message only be send to 1 tab/window?

jcbrand commented 10 years ago

In future, please send questions such as this one to the mailing list (conversejs@librelist.com). The issue tracker is for bugs and feature requests.

In the Plone addon collective.xmpp.chat which uses converse.js with prebind, a new session is created every time the page loads.

Each tab will therefore have a different SID and resource, meaning that each tabs is viewed as a separate chat client.

I then had the issue of making sure that all chat clients (i.e. each tab) show all sent and received messages.

I added some code which will forward messages to other connected resources, specifically for this case, where you want other tabs to see the messages you have sent. See here: https://github.com/collective/collective.xmpp.chat

Then recently I recently also merged a pull request which added carbon support (which is an XEP designed to solve the same problem): http://xmpp.org/extensions/xep-0280.html

bill2004158 commented 10 years ago

that is great idea!

ghost commented 10 years ago

Hey,

I'm still having that behavior: only one tab receives messages. It's the one that last sent something (a message or maybe a presence).

Any hint? (I don't have much more detail right here.) Thanks.

ghost commented 10 years ago

Openfire requires a specific property to be set: route.all-resources must be true.

mckaygerhard commented 10 years ago

its not my dessired behavior but: how in ejabberd?