Name
x — Optional
Synopsis
<presence from='dj@yak/Work' to='sabine@yak'>
<status>Online</status>
<priority>1</priority>
<x xmlns='jabber:x:delay' from='dj@yak/Work'
stamp='20011005T10:58:28'/>
</presence>
Just as with the <message/>
element, extra information can be attached to the
<presence/>
element by means
of the <x/>
tag. In the same
way, each <x/>
tag must be
qualified with a namespace.
While there aren’t many external uses for payloads in a
<presence/>
packet, the Jabber
server uses this facility to add information. In this example, we
see that dj@yak’s notification of
availability (remember, type='available'
is assumed for
<presence/>
packets without
an explicit type
attribute) is being sent
to sabine@yak.
While dj@yak connected to the Jabber server
and sent his availability (which was stamped on receipt by the Jabber server)
just before 11 a.m.,
sabine@yak is just logging on now (say,
30 minutes later). When she receives
dj@yak’s presence, she knows how long that
presence status has been valid for.
See Section 6.3 in Chapter 6 to find out what
namespaces are available to qualify
<x/>
-included payloads.
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.