Reputation: 1016
Is there a way to set the priority of a client in Strophe.js manually for an xmpp connection.
I am communicating with a google talk server, and have 2 seperate clients. One client signals the availability status (online/offline/etc...).The other will be for receiving messages regardless of the other clients status.
http://www.ietf.org/rfc/rfc3921.txt Section 11.1.4
Specifies that
For message stanzas, the server SHOULD deliver the stanza to the highest-priority available resource (if the resource did not provide a value for the element, the server SHOULD consider it to have provided a value of zero). If two or more available resources have the same priority, the server MAY use some other rule (e.g., most recent connect time, most recent activity time, or highest availability as determined by some hierarchy of values) to choose between them or MAY deliver the message to all such resources. However, the server MUST NOT deliver the stanza to an available resource with a negative priority; if the only available resource has a negative priority, the server SHOULD handle the message as if there were no available resources (defined below).
So essentially I want to set a negative priority for one client, and a positive priority for the other. This way only one of the clients receives the messages. Is there a way to do this? Or is presence priority purely handled by the server?
Is it as simple as:
connection.send($pres({priority: 100}))
Upvotes: 0
Views: 1236