[standards-jig] JEP-0045 (MUC) number of users (extendingJEP-0030)

Richard Dobson richard at dobson-i.net
Fri Feb 13 13:24:43 UTC 2004


> A MUC server's response to a disco#items query should be limited to the
> information users need to choose which room to enter (i.e. the room name,
> the number of occupants, and the jid). It should not be necessary to send
a
> disco#info query to every room. disco#info should only be for those rooms
> the user has indicated a specific interest in.

No this is not how disco works, to find out if an item is even a room you
need to disco#info it to find out its identity, you cannot assume all of the
items are rooms, you could conceivably have any type of item in the
response, so whatever happens you have to disco#info all of the disco#items,
that is how the disco protocol was designed to and is intended to work, it
is completely intensional that it works in this way, if we start including
info in the disco#items response we will just end up with a protocol
effectively the same as jabber:iq:browse which IMO would be a big step
backwards.

> disco#items does not (and should not) have a standard mechanism MUC can
use
> for communicating information like the number of occupants. But it does
> explicitly allow MUC to provide extra XML like:
>
> ...
> <item jid='darkcave at macbeth.shakespeare.lit' name='A Dark Cave'>
>   <info xmlns='http://jabber.org/protocol/muc#room' occupants='1'/>
> </item>
> ...

disco#items was designed specifically to only be a simple list of items, and
disco#info for discovering further information about each item, therefore
the occupants extension needs to be added to disco#info not disco#items.

> Peter Millard wrote:
> > It may be that at some point, we may want to extend disco#info so that
you
> embed more full-featured > meta-data into it, but right now, the protocol
> does not allow it.
>
> Yes, disco#info really needs to be extended. It claims to be 'A simple
> protocol for discovering information about... a Jabber Entity'. But it
> currently only permits the entity to provide a list supported features.
>
> I propose the 'http://jabber.org/protocol/disco#info' namespace in
JEP-0030
> could be simply extended to allow values as well as features:
>
> <iq type='result'
>     from='darkcave at macbeth.shakespeare.lit'
>     to='hag66 at shakespeare.lit/pda'>
>   <query xmlns='http://jabber.org/protocol/disco#info'>
>     <identity
>         category='conference'
>         type='text'
>         name='A Dark Cave'/>
>     <feature var='http://jabber.org/protocol/muc'/>
>     <feature var='muc_temporary'/>
>     <feature var='muc_unmoderated'/>
>     <feature var='muc_nonanonymous'/>
>     <value name='description'>The place for all good witches!</value>
>     <value name='subject'>Fire Burn and Cauldron Bubble!</value>
>   </query>
> </iq>

IMO it would be far better to extend it as follows:

 <iq type='result'
     from='darkcave at macbeth.shakespeare.lit'
     to='hag66 at shakespeare.lit/pda'>
   <query xmlns='http://jabber.org/protocol/disco#info'>
     <identity
         category='conference'
         type='text'
         name='A Dark Cave'/>
     <feature var='http://jabber.org/protocol/muc'/>
     <feature var='muc_temporary'/>
     <feature var='muc_unmoderated'/>
     <feature var='muc_nonanonymous'/>
    <roominfo xmlns='http://jabber.org/protocol/muc#room' desc='The place
for all good witches!' subject='Fire Burn and Cauldron Bubble'
occupants='1'/>
   </query>
 </iq>

Richard




More information about the Standards mailing list