[jdev] RE: [jadmin] Questions with JEP 045
JD Conley
jconley at winfessor.com
Mon Apr 5 19:59:28 CDT 2004
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 "[room]@[service]/[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='darkcave at macbeth.shakespeare.lit/firstwitch'
to='hag66 at shakespeare.lit/pda'>
<x xmlns='http://jabber.org/protocol/muc#user'>
<item affiliation='owner' role='moderator'/>
</x>
</presence>
<presence
from='darkcave at macbeth.shakespeare.lit/secondwitch'
to='hag66 at shakespeare.lit/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='darkcave at macbeth.shakespeare.lit/firstwitch'
to='hag66 at shakespeare.lit/pda'>
<x xmlns='http://jabber.org/protocol/muc#user'>
<item affiliation='owner' role='moderator'
jid='crone1 at shakespeare.lit/desktop'/>
</x>
</presence>
<presence
from='darkcave at macbeth.shakespeare.lit/secondwitch'
to='hag66 at shakespeare.lit/pda'>
<x xmlns='http://jabber.org/protocol/muc#user'>
<item affiliation='admin' role='moderator'
jid='wiccarocks at shakespeare.lit/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
(darkcave at macbeth.shakespeare.lit/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:rthummal at csnet.cs.odu.edu]
> Sent: Monday, April 05, 2004 5:14 PM
> To: jdev at jabber.org; jadmin at jabber.org
> 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='hag66 at shakespeare.lit/pda'
> to='darkcave at macbeth.shakespeare.lit/thirdwitch'>
> <x xmlns='http://jabber.org/protocol/muc'/>
> </presence>
> Once Jabber user enters a room(in this case
> darkcave at macbeth.shakespeare.lit/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='darkcave at macbeth.shakespeare.lit/firstwitch'
> to='hag66 at shakespeare.lit/pda'>
> <x xmlns='http://jabber.org/protocol/muc#user'>
> <item affiliation='owner' role='moderator'/>
> </x>
> </presence>
> <presence
> from='darkcave at macbeth.shakespeare.lit/secondwitch'
> to='hag66 at shakespeare.lit/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='darkcave at macbeth.shakespeare.lit/thirdwitch'
> to='crone1 at shakespeare.lit/desktop'>
> <x xmlns='http://jabber.org/protocol/muc#user'>
> <item affiliation='member' role='participant'/>
> </x>
> </presence>
> <presence
> from='darkcave at macbeth.shakespeare.lit/thirdwitch'
> to='wiccarocks at shakespeare.lit/laptop'>
> <x xmlns='http://jabber.org/protocol/muc#user'>
> <item affiliation='member' role='participant'/>
> </x>
> </presence>
> <presence
> from='darkcave at macbeth.shakespeare.lit/thirdwitch'
> to='hag66 at shakespeare.lit/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
> hag66 at shakespeare.lit/pda. How does client at
> crone1 at shakespeare.lit/desktop and
> wiccarocks at shakespeare.lit/laptop know about presence of
> hag66 at shakespeare.lit/pda, as this
> jid is not mentioned anywhere.
> Any help on this would be great.
>
> Thanks
> Raghu
> _______________________________________________
> jadmin mailing list
> jadmin at jabber.org
> https://jabberstudio.org/mailman/listinfo/jadmin
>
More information about the JDev
mailing list