Projects tigase _server tigase-muc Issues #101
Extended retrieving member list (#101)
Closed
Bartosz Małkowski opened 7 years ago
Due Date
2017-06-12

User Story

User wants to retrieve users with different roles and/or affiliations in single request instead of requesting each role/affiliation separately.

Solution

User may add more than one <item/> elements to query.

For example:

<iq
    from='crone1@shakespeare.lit/desktop'
    to='darkcave@macbeth.shakespeare.lit'
    type='get'
    id='gml04'>
  <query xmlns="http://jabber.org/protocol/muc#admin">
    <item affiliation="admin" />
    <item affiliation="outcast" />
    <item role="moderator" />
  </query>
</iq>

In response MUC will send:

<iq
    from='darkcave@macbeth.shakespeare.lit'
    to='crone1@shakespeare.lit/desktop'
    type='result'
    id='gml04'>
  <query xmlns='http://jabber.org/protocol/muc#admin'>
    <item nick="secondwitch" role="participant" jid="wiccarocks@shakespeare.lit" affiliation="admin"/>
    <item nick="firstwitch" role="moderator" jid="crone1@shakespeare.lit" affiliation="owner"/>
  </query>
</iq>

Additionally there is shortcut: instead of listing all roles or affiliation, there is possibility to use keyword @all@:

<iq
    from='crone1@shakespeare.lit/desktop'
    to='darkcave@macbeth.shakespeare.lit'
    type='get'
    id='gml05'>
  <query xmlns="http://jabber.org/protocol/muc#admin">
    <item affiliation="all" />
    <item role="all" />
  </query>
</iq>
<iq
    from='darkcave@macbeth.shakespeare.lit'
    to='crone1@shakespeare.lit/desktop'
    type='result'
    id='gml05'>
  <query xmlns='http://jabber.org/protocol/muc#admin'>
    <item nick="thirdwitch" role="participant" jid="hag66@shakespeare.lit" affiliation="none"/>
    <item nick="secondwitch" role="participant" jid="wiccarocks@shakespeare.lit" affiliation="admin"/>
    <item nick="firstwitch" role="moderator" jid="crone1@shakespeare.lit" affiliation="owner"/>
  </query>
</iq>
issue 1 of 1
Type
New Feature
Priority
Normal
Assignee
RedmineID
5666
Issue Votes (0)
Watchers (0)
Reference
tigase/_server/tigase-muc#101
Please wait...
Page is in error, reload to recover