<presence/>
Presence is all about communicating the current state or availability. If you think about IM systems, then this is the online, busy, away, or offline status of another user. For real-time communications, it is important to know whether another user is available when you send them a message so that you can (hopefully) receive a timely response.
The following is an example of a user sending their presence to their XMPP server (note that this can be achieved by not setting the to
attribute), telling the server that they are online and ready to receive push updates. For example if Marty arrived late at school because Doc Brown set all the clocks incorrectly, he can also set a status message:
<presence from="[email protected]/highschool"> <show>available</show> <status>Damn alarm clocks!</status> </presence>
User presence updates generally have three (all optional) children, which are as follows:
type
: The availability of the...