2009/4/8 Robin Redeker <[email protected]>:
> Imagine these presence stanzas are received by a client for contact a...@b:
>
>   <presence from="a...@b/X" to="m...@jid/myres"/>
>
>   <presence from="a...@b/Y" to="m...@jid/myres">
>      <priority>10</priority>
>      <show>xa</show>
>   </presence>
>
>   <presence from="a...@b" to="m...@jid/myres">
>      <show>away</show>
>   </presence>
>
> What should I display? Is the last presence from 'the "empty" resource'?  
> Empty
> resources make no sense, as any resource's name must not be empty anyways (see
> BNF in RFC 3920). But whats the alternative interpretation of presence from a
> bare JID? Does it shadow any other presence? Is it guaranteed that a client 
> will
> not receive presence for a bare JID and full JID from the same contact?
>

Such behavior is clearly not correct. It deserves some clarification I guess.
I would handle it this way:

If it's available presence -> handle it normally as if the resource
was an empty string.
If it's unavailable presence -> consider all resources unavailable.
Handling of error presences is defined in the spec.

It's the best possible handling I think, since any entity sending
presence from full JID does that for the reason that it never needs
more resources.


>
> This means a server only remembers the last received unavailable presence, but
> a client _must_ display all unavailable presences it receives. That feels a 
> bit
> inconsistent to me. Also imagine what happens when people use random 
> resources,
> then the list of unavailable presences (which MUST be displayed
> "appropriately") will grow indefinitely! Ok, this is maybe no "appropriate",
> but what _IS_ actually appropriate in this case?
>
>

Again, that needs to be clarified. Most clients these days (as far as
I know) don't display unavailable presences in the roster, except the
last one. That is, you will display the status message in roster only
if it causes the contact itself to "go offline". Or does anyone handle
it differently?

Reply via email to