[Standards] Presence Priority Implementation Guide

Joe Hildebrand hildjj at gmail.com
Mon May 21 15:41:35 UTC 2007

On May 17, 2007, at 11:38 AM, Rachel Blackman wrote:

>> I know I do not personally manually set my status to "away" on my  
>> desktop
>> when I leave. I just let the desktop client set me automatically  
>> away after
>> x minutes. During those x minutes (or maybe for the entire session  
>> depending
>> on the server implementation) I will "lose" messages from already  
>> initiated
>> chats because they will be delivered to the desktop, and not my  
>> mobile. I
>> may be atypical because I always stay logged in using my mobile  
>> client, even
>> while I am using my desktop for an extended period of time.
> How I handle it in Astra is that for the first message, I send to  
> the bare JID of the other person.  After I receive a message (or if  
> they initiate the chat), I send to the fully qualified JID they've  
> messaged me from.
> If I close the chat window, I assume the chat is done and no longer  
> remember that resource, obviously enough.  However, I /also/ forget  
> the resource if I receive a 'gone' Chat State Notification.  If I  
> get a 'gone,' I do not close the chat window to that person, but if  
> I send another message I will revert to sending it using the bare  
> JID again.  This logic makes sense to me, as gone is used for 'I  
> have been away from the keys for a long time' or 'I closed my chat  
> window to you.'
> This method seems to work fairly well for anything that supports  
> XEP-0085, though it does sort of require blindly trusting the  
> server's delivery mechanics when sending to a bare JID.  On the  
> other hand, it doesn't work so well if the other client doesn't  
> support XEP-0085.

It's also probably a good idea to forget the resource whenever you  
get a presence change from that user's bare JID; certainly you should  
if you get a presence change from the resource you're chatting with.

More information about the Standards mailing list