On 1/21/11 2:34 PM, Tobias Markmann wrote:
> On Fri, Jan 21, 2011 at 22:31, Matthew Wild <[email protected]> wrote:
>> FWIW Prosody solves this by simply not sending any presence in such
>> cases. It's not terribly intuitive, but it seems to work.
> 
> Right. Distributing the joining presence wouldn't be a problem. I'd
> just look like a change of status of the already existing occupant in
> the room. However, the leaving presence can only be distributed if
> there are no other sessions running for an occupant(nickname) in a
> room.

We had a chat about this in a MUC room. ;-)

http://logs.jabber.org/2011/1/21/jdev.html#2011-01-21T21:27:49.46082

I think it's best for the room to send this "leave" notification only to
the client that sent it (so the client knows that it's really out of the
room).

So:

###

In order to exit a multi-user chat room, an occupant sends a presence
stanza of type "unavailable" to the <room@service/nick> it is currently
using in the room.

Example 72. Occupant Exits a Room

<presence
    from='[email protected]/pda'
    to='[email protected]/thirdwitch'
    type='unavailable'/>


The service MUST then send a presence stanzas of type "unavailable" from
the departing occupant's room JID to the departing occupant's full JIDs:

Example 73. Service Sends Self-Presence Related to Departure of Occupant

<presence
    from='[email protected]/thirdwitch'
    to='[email protected]/pda'
    type='unavailable'>
  <x xmlns='http://jabber.org/protocol/muc#user'>
    <item affiliation='member'
          jid='[email protected]/pda'
          role='none'/>
    <status code='110'/>
  </x>
</presence>

If the service allows the occupant to associate more than one full JID
with the same room JID and there is at least one more full JID currently
associated with the room JID, then the service SHOULD NOT broadcast the
in-room unavailable presence notification to the rest of the occupants.

Otherwise, the service MUST then send presence stanzas of type
"unavailable" from the departing occupant's room JID to the full JIDs of
the remaining occupants:

[...]

###




Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to