How to stop Google from randomizing an xmpp resource

In XMPP (i.e. gtalk) we can set the resource for our desire (specify the machine / location / etc), and this works well with all / most servers and clients. But in the case of google, this does not work properly, because every time the user connects, Google adds a random string to the resource set by the user. This is especially annoying because many clients distinguish between user chats as part of jid AND resource, which leads to opening several windows / tabs after reconnecting (and a new resource is generated).

tl; dr - is there any way to prevent Google from adding a random string to a resource set by the user?

+4
source share
2 answers

Short answer, no way. For security reasons, the resource should be unpredictable. And the GTalk server provides this by adding a random string to your resource.

+2
source

In addition to @Alex's correct answer, do not use resources semantically. For chats, clients really should not treat each resource as a separate conversation. We learned this lesson more than ten years ago. To identify the client, use XEP-0115 instead of a hard-coded resource.

+2
source

All Articles