I am not sure what an empty resource means in context of available presence 
from a user - since you cant bind to an empty resource for a user : so what is 
the user expectation on seeing something like that in psi ?

Whether server allows a client to send presence with 'from' set to something 
other than its own full jid - usually a client does not need to set the from in 
first place : and iirc the server I worked on always used to remove the from 
and set it appropriately (full jid for presence update/broadcast, bare jid for 
subscription responses).


The only case where an unavailable (and not available) can get sent is a 
response to probe - and that is interpreted as no resource available for the 
barejid.


Regards,
Mridul



--- On Wed, 8/4/09, Justin Karneges <[email protected]> 
wrote:

> From: Justin Karneges <[email protected]>
> Subject: Re: [Standards] unavailable presence from bare JID
> To: "XMPP Standards" <[email protected]>
> Date: Wednesday, 8 April, 2009, 10:53 PM
> On Wednesday 08 April 2009 08:36:50
> Robin Redeker wrote:
> > I'm also wondering about the general semantics of
> _available_ presence from
> > a bare JID, like discussed in another branch of this
> thread.
> >
> > 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?
> 
> I don't think this was ever fully specified, but we have a
> decade of history 
> where regular Jabber contacts have been using resources and
> transport 
> contacts have not, and so clients have had to deal with the
> discrepancy.  
> Since about 2002, Psi has supported multiple resources, and
> presence from a 
> JID without a resource is treated as if there is a resource
> whose value is 
> empty.  In the Psi UI, you would see the resources for
> a...@b as "X", "Y", 
> and "[blank]".
> 
> You might be able to get away with an empty resource
> overshadowing all 
> non-empty ones, and any non-empty one overshadowing an
> empty one, whichever 
> is received most recently, under the assumption that the
> two approaches would 
> never be mixed.  However, I feel being able to support
> empty and non-empty 
> side-by-side for the same bare JID is the safest approach
> in a client.  For 
> better or worse, I think empty resources are a de facto
> standard we're stuck 
> with.
> 
> -Justin
> 


      Add more friends to your messenger and enjoy! Go to 
http://messenger.yahoo.com/invite/

Reply via email to