[standards-jig] o/~ disco, disco MUC o/~

Alexey Shchepin alexey at sevcom.net
Tue Nov 12 15:25:31 UTC 2002


Hello, Peter!

On Mon, 11 Nov 2002 15:18:53 -0600 (CST), you said:

 PS> Alexey Shchepin wrote:
 >> Such flexibility can be requested by other services in the future, but
 >> current Disco protocol allows only one 'items' or 'info' reply per JID.  I
 >> suggest to add e.g. 'id' attribute to <items/> and <query/> elements to
 >> allow every JID have it's own disco hierarchy.
 PS> I'm not sure what you mean by this.

Look, here I try to imagine how service can answer to JEP-45 Ex.9 query:

Example 9. User Queries for Items Associated with a Specific Chat Room
<iq 
    type='get'
    from='hag66 at shakespeare.lit/pda'
    to='darkcave at macbeth.shakespeare.lit'
    id='disco4'>
  <query xmlns='http://jabber.org/protocol/disco#items'/>
</iq>

Conference room then returns list of affiliations and roles:

<iq 
    type='result'
    from='darkcave at macbeth.shakespeare.lit'
    to='hag66 at shakespeare.lit/pda'
    id='disco4'>
  <query xmlns='http://jabber.org/protocol/disco#items'>
    <item jid='darkcave at macbeth.shakespeare.lit'
          id='moderators'
          name='Moderators'/>
    <item jid='darkcave at macbeth.shakespeare.lit'
          id='banned'
          name='Banned users'/>
    ...
  </query>
</iq>

(BTW, in JEP-0045, Example 10 it seems need to replace 
  <item jid='darkcave at shakespeare.lit/firstwitch'/>
  <item jid='darkcave at shakespeare.lit/secondwitch'/>
to
  <item jid='darkcave at macbeth.shakespeare.lit/firstwitch'/>
  <item jid='darkcave at macbeth.shakespeare.lit/secondwitch'/>
)

User queries for moderator list:
<iq 
    type='get'
    from='hag66 at shakespeare.lit/pda'
    to='darkcave at macbeth.shakespeare.lit'
    id='disco5'>
  <query xmlns='http://jabber.org/protocol/disco#items'
         id='moderators'/>
</iq>

Conference room returns list of moderators:

<iq 
    type='result'
    from='darkcave at macbeth.shakespeare.lit'
    to='hag66 at shakespeare.lit/pda'
    id='disco5'>
  <query xmlns='http://jabber.org/protocol/disco#items'
         id='moderators'>
    <item jid='moderator at shakespeare.lit'/>
    <item jid='someone at shakespeare.lit'/>
    ...
  </query>
</iq>

 PS> Why do we need a "disco hierarchy" or the ability to send multiple 'items'
 PS> or 'info' replies from the same JID?

Because JID can have many subitems, and if we include them all in one reply,
then this can be messy (e.g. in MUC we don't want to mix admins with
participants, but want to this items can be browsed via disco).  But they can
be structured (e.g. by breaking into groups, or by arranging in tree-like
structure) via adding attribute which distinguish one items from another.

One more example: jabberd1.4 in browse reply to one of the admins of this
server inserts "Online Users" item with jid='servername/admin'.  But this is
again JID overloading, and works only because this JID not used anywhere.  For
me looks better if server sends this in disco reply like
<item jid='servername' id='online users'/>.



More information about the Standards mailing list