[JDEV] What about the resource?

Jens Alfke jens at mac.com
Mon Aug 13 11:50:04 CDT 2001

On Monday, August 13, 2001, at 09:02 AM, Sebastiaan 'CBAS' Deckers wrote:

> I have two items in my roster. user at server/home and user at server/work

Hmm, storing resources in the roster is a new one to me. I guess that 
implies that you sent a subscribe request to a particular resource, and 
that you would then learn about presence of that person _only_ at that 
particular resource. Which is probably not what the user of your client 
had in mind, although it might be useful in specific circumstances.

In my client, and in the examples I've seen, subscribe requests are sent 
to JIDs without resources. That way you learn about that person's 
presence no matter where they're logged in.

> Should I treat these as seperate contacts in my client? Or should I 
> ignore
> the resource and show only one person?

It depends on what the user model of a "person" is in your GUI. The way 
I decided it, my client considers all resources of one JID to be a 
single person and displays the status and message of the most-available 
resource. In fact, I allow multiple JIDs per person and use the 
most-available resource of all the JIDs.


More information about the JDev mailing list