[jdev] presence persistence
Mats Bengtsson
matben at privat.utfors.se
Wed Nov 30 09:23:04 CST 2005
Although not recommended, it is allowed to use presence stanzas to broadcast
custom elements (rfc3921):
"
As described under extended namespaces (Section 2.4), a presence
stanza MAY contain any properly-namespaced child element.
"
Each client keeps an internal state of
the users presence state, but what happens to these states when a custom
presence is received? An example:
If I initially get
<presence type='available' from='x' ...>
<show>dnd</show>
</presence>
and then later a custom presence
<presence from='x' ...>
<custom xmlns=.../>
</presence>
shall the user 'x' status still be 'dnd'?
But if I instead get
<presence from='x' .../>
without any custom element the status is obviously 'available' and not 'dnd'.
This doesn't make any sense. One way out of this is if custom presence
included the other elements <show/> <status/> <priority/> but that seems clumsy.
We already have this situation with caps elements, but they are typically only
sent with the initial presence, and don't cause this dilemma.
Ideas? /Mats
More information about the JDev
mailing list