Name
to — Optional
Synopsis
<presence to='sabine@yak'
/>
The to
attribute is optional; if, as a user, you are
just announcing availability (with the intention of having that announcement
reflected to the appropriate members of your roster), then specifying a
to
attribute is not appropriate.[8]
If you want to send your availability to a specific entity, then do so using
this to
attribute, specifying that entity’s
JID. Why might you want to do this? See Section 5.4.2.4
for an answer.
[8] In fact, as in the cases for the other two elements, <message/>
and
<iq/>
, not specifying a
to
attribute will cause the
<presence/>
packet to be
sent to the sender. However, in the case of the presence handler mechanism,
the packet is swallowed before it can reach its destination, to prevent
reflective presence problems.
Get Programming Jabber now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.