Reputation:
Same user logged in three device(User name "A"), if a message is send to this user(User name "A") from another user(User name: "B") only one devices is receiving the messages other two devices are not receiving.
Kindly provide me a solution.
Upvotes: 3
Views: 999
Reputation: 56
In case the message is sent to the full JID (i.e. user@domain/resource
) there is no way to make other devices of the same user (but with a different resources) to receive the same message. This could be only possible if the XEP-0280 aka "Message Carbons" is implemented (this is what xnyhps suggested).
In case when the messages is sent to the bare JID (i.e. user@domain
), it's usually sent based on presence priorities (f.e. it's true for Ejabberd), if all devices have the same presence priority the message will be sent to all the devices. It could not be true for your server, RFC 6121 says only about delivering to the "most available" resource, so everything depends on implementation:
delivering the message to the "most available" resource or resources according to the server's implementation-specific algorithm, e.g., treating the resource or resources with the highest presence priority as "most available" (M)
If you develop your custom client and aren't going to use any 3rd-party clients in your chat-system, it could be ok to not use carbons and just stick to the default server option of the message delivery. At least for the first time.
Upvotes: 2