2

In xmpp, following 2 users could join multi-user chat(MUC) or subscribe to same pub-sub node?

public@service.com/user1 public@service.com/user2

Shaheed ulHaq
  • 498
  • 5
  • 20
  • Related: http://stackoverflow.com/questions/12478871/join-xmpp-muc-with-one-jid-simultaneously-from-different-resources-with-openfire – Flow Dec 01 '12 at 17:09

2 Answers2

4

When joining an anonymous MUC room, a room where others do not know the "real" JID of others in the room, the connecting user provides their own JID.

When joining a non-anonymous room the users provide their full JID which is transmitted then to all occupants.

In either case there is nothing to prevent the user from joining with the same bare JID but different resources. More details on the MUC protocol, specifically around joining a room can be found in XEP-0045: Basic MUC Protocol.

When subscribing via pub-sub the client can provide either a full JID or a bare JID (no resource) when subscribing. Details for this can be found in the pub-sub XEP, XEP-0060

alexwen
  • 1,128
  • 7
  • 16
  • Thanks guys! Also if you want to comment on this: I actually want to use a single jabber user for multiple site users, Im thinking that will create less load on XMPP server, as I need to login just one jabber user.. and site users will be transmitting messages to each other using different resources. I'm approaching it right do you think? – Shaheed ulHaq Apr 11 '12 at 06:59
3

In most MUC implementations, you must join the room with a different nickname for each of your resources. If you use the same nickname for the second resource, you are likely to get a conflict error.

Joe Hildebrand
  • 10,354
  • 2
  • 38
  • 48
  • 1
    But it really depends on the server. Prosody for example lets you use the same nick from different resources. – Zash Apr 06 '12 at 19:01
  • @Zash Is this still the case? On Conversations, I get a "Nick already in use" error. Perhaps this is due to a Conversation client-side check? (Same in Gajim) – Steven Roose Apr 13 '18 at 20:17