On Dec 12, 2007, at 7:04 AM, Robin Redeker wrote:
Ok, I have another question:

We have: Contact A with one resource (resource is 'res1'):

 [EMAIL PROTECTED]/res1

And Contact B with two resources:

 [EMAIL PROTECTED]/res1  priority 20

Assume you mean contact_b.

 [EMAIL PROTECTED]/res2  priority 10

They are not subscribed to each other and do NOT share any presence
information.

Even directed presence? The cool side effect of sending a directed presence is that everyone to whom you have sent directed presence will get an unavail when you go offline.

Contact A sends a bare JID message to contact B. Contact B receives the
message at res1 (due to highest priority), and answers from that
resource. Contact A receives the full JID of that resource now and
'binds' the conversation to it and they chat. Later Contact B switches
to his laptop, with another client bound to the other resource 'res2'.
And he sends a message to the bare JID (because the client there doesn't
know the full JID of contact A) of contact A.
How should contact A proceed? Should he bind (and reply) the conversation to res2?
Should he make a second 'chat session', which is probably not very
intuitive for the user because he just wanted to talk to contact B and
when he got two options to send the message, what should he do (he
doesn't even know which resource is the 'right' one, or whether 'res1'
maybe went offline)?

You're correct that there shouldn't be a new visible session. There were clients that did that back in the day (or with each new thread!) and it turned out to be pretty confusing. You should just rebind to the new resource.

What if they share presence, should contact A's client determine from
the highest priority resource where the message should go to?

Absolutely not. You should just unbind at least when res1 goes offline, and perhaps whenever you get a presence change from contact_b. Keep in mind that b's server might be doing much more sophisticated "most available" calculations.

Alternate question: What if contact_b's server is using RAP (XEP-168)? Then contact_a can know what the new most available resource is? My answer to that is that if the resource contact_a is bound to was the primary resource, and now isn't, you should unbind, otherwise not.

--
Joe Hildebrand

Reply via email to