tags:

views:

19

answers:

1

I'm writing an app which communicates with clients via XMPP. I want to be able to use the users existing xmpp account (they all have google ID's) but I don't want my messages to appear in their regular IM stream.

I'm thinking that when my client pairs with the server it could use a custom resource id eg [email protected]/MYCUSTOMID then I can always send messages to that ID with the resource tag.

Is this the best approach, are Resource ID's tied to a specific install of a client or should they change on a per session basis?

A: 

Google will modify any resource you give it by adding a random identifier to the end.

If you're writing both the sender and the receiver, try using an XMPP extension:

<message to="[email protected]">
  <x xmlns='http://my.domain.example.com/my_extension'&gt;stuff&lt;/x&gt;
</message>

If you need to be able to tell which of the resources is your client, try XEP-0115.

Joe Hildebrand