Group chat and resource - what is intended behaviour

Hi, quick newbie question regarding group chat and chat in general. If you supply a group chat or chat message to an intended recipient and don’'t supply the resource onto end of name then what should happen?

Eg. send a message to and there is another resource also connected as (same person on home computer). Then does sending to send teh message to both or fail to arrive at both recipient clients etc. Any clarification appreciated. The smack API does not in some cases return the resource type of teh user so does it assume you don’'t care what the resource is, rather that you send to the userid without the resourece (in this case and it then updates all clients connected.

Hey arcs,

When sending a message to a user without specifying a resource then the server is the one that will decide how to handle that. Usually XMPP servers will send the message to the resource with the highest priority. And if all resources have the same priority then the message will go to one of the resources using some algorithm.

The user that gets the message will get it as it was sent from the other user. That means that the TO address will be the bare JID of the user (i.e. no resource). Usually when you reply to such message you will use your full JID (i.e. with a resource) so the other party will always send messages to that resource and not any other resource that may appear during the conversation.


– Gato