I'm CCing JDEV on this reply, as it the appropriate list to talk about
something like this on.
JEP-0045 (MUC) provides for anonymous multi user chat. The JIDs used in
a room are in the form "[EMAIL PROTECTED]/[nick]". If the room isn't
fully anonymous (a room configuration option) the user's jid is included
in the presence stanza as an attribute to the item tag. Let's look at
the first set of stanzas:
Example 19. Service Sends Presence from Existing Occupants to New
Occupant
<presence
from='[EMAIL PROTECTED]/firstwitch'
to='[EMAIL PROTECTED]/pda'>
<x xmlns='http://jabber.org/protocol/muc#user'>
<item affiliation='owner' role='moderator'/>
</x>
</presence>
<presence
from='[EMAIL PROTECTED]/secondwitch'
to='[EMAIL PROTECTED]/pda'>
<x xmlns='http://jabber.org/protocol/muc#user'>
<item affiliation='admin' role='moderator'/>
</x>
</presence>
Those two stanzas are from members already in the room, sent to the
occupant that just joined. From the stanza from addresses you can see
that their nick names are firstwitch and secondwitch. Their real JIDs
are not necessary to know in order to do multi user chat. If the room
has been configured as Non-Anonymous
(http://www.jabber.org/jeps/jep-0045.html#enter-nonanon), the following
two stanzas would have been received instead:
Example 19 (revised for Non-Anonymous). Service Sends Presence from
Existing Occupants to New Occupant
<presence
from='[EMAIL PROTECTED]/firstwitch'
to='[EMAIL PROTECTED]/pda'>
<x xmlns='http://jabber.org/protocol/muc#user'>
<item affiliation='owner' role='moderator'
jid='[EMAIL PROTECTED]/desktop'/>
</x>
</presence>
<presence
from='[EMAIL PROTECTED]/secondwitch'
to='[EMAIL PROTECTED]/pda'>
<x xmlns='http://jabber.org/protocol/muc#user'>
<item affiliation='admin' role='moderator'
jid='[EMAIL PROTECTED]/laptop'/>
</x>
</presence>
The same goes for your next example. The from address contains the
anonymous JID of your user as he is addressed in the chat room
([EMAIL PROTECTED]/thirdwitch). Your nick name is
thirdwitch, which you specified as the "to" address in your presence
stanza to join the room.
JD Conley
> -----Original Message-----
> From: rthummal [mailto:[EMAIL PROTECTED]
> Sent: Monday, April 05, 2004 5:14 PM
> To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: [jadmin] Questions with JEP 045
>
> Hi,
> I got a question about JEP 045(Described in
> http://www.jabber.org/jeps/jep-0045.html#enter)
> I am providing the contents of this JEP where I am really confused.
> Example 18. Jabber User Seeks to Enter a Room (Multi-User Chat)
> <presence
> from='[EMAIL PROTECTED]/pda'
> to='[EMAIL PROTECTED]/thirdwitch'>
> <x xmlns='http://jabber.org/protocol/muc'/>
> </presence>
> Once Jabber user enters a room(in this case
> [EMAIL PROTECTED]/thirdwitch),
> server sends others(in this room) presence to this new user.
> Example 19. Service Sends Presence from Existing Occupants to
> New Occupant
> <presence
> from='[EMAIL PROTECTED]/firstwitch'
> to='[EMAIL PROTECTED]/pda'>
> <x xmlns='http://jabber.org/protocol/muc#user'>
> <item affiliation='owner' role='moderator'/>
> </x>
> </presence>
> <presence
> from='[EMAIL PROTECTED]/secondwitch'
> to='[EMAIL PROTECTED]/pda'>
> <x xmlns='http://jabber.org/protocol/muc#user'>
> <item affiliation='admin' role='moderator'/>
> </x>
> </presence>
>
> These are the stanzas provided by the JEP 045 specification
> document. Once the client receives
> these messages how does it know about the rest of the members
> in that room. No where their
> nickname or jid is specified in the presence stanza.
> Example 20. Service Sends New Occupant's Presence to All Occupants
> <presence
> from='[EMAIL PROTECTED]/thirdwitch'
> to='[EMAIL PROTECTED]/desktop'>
> <x xmlns='http://jabber.org/protocol/muc#user'>
> <item affiliation='member' role='participant'/>
> </x>
> </presence>
> <presence
> from='[EMAIL PROTECTED]/thirdwitch'
> to='[EMAIL PROTECTED]/laptop'>
> <x xmlns='http://jabber.org/protocol/muc#user'>
> <item affiliation='member' role='participant'/>
> </x>
> </presence>
> <presence
> from='[EMAIL PROTECTED]/thirdwitch'
> to='[EMAIL PROTECTED]/pda'>
> <x xmlns='http://jabber.org/protocol/muc#user'>
> <item affiliation='member' role='participant'/>
> </x>
> </presence>
>
> Here even the case is the same as all the other clients
> receive the presence of
> [EMAIL PROTECTED]/pda. How does client at
> [EMAIL PROTECTED]/desktop and
> [EMAIL PROTECTED]/laptop know about presence of
> [EMAIL PROTECTED]/pda, as this
> jid is not mentioned anywhere.
> Any help on this would be great.
>
> Thanks
> Raghu
> _______________________________________________
> jadmin mailing list
> [EMAIL PROTECTED]
> https://jabberstudio.org/mailman/listinfo/jadmin
>
_______________________________________________
jdev mailing list
[EMAIL PROTECTED]
https://jabberstudio.org/mailman/listinfo/jdev