Project

General

Profile

Feature #5666

Avatar?id=6098&size=50x50 Avatar?id=6098&size=22x22

Extended retrieving member list

Added by Bartosz Małkowski TigaseTeam almost 2 years ago. Updated almost 2 years ago.

Status:
Resolved
Priority:
Normal
Target version:
-
Start date:
Due date:
2017-06-13
% Done:

100%

Estimated time:
Source Code Disclaimer:

Description

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>

Associated revisions

Revision ff484468 (diff)
Added by Bartosz Małkowski TigaseTeam almost 2 years ago

Feature #5666: Extended retrieving member list

Revision 32617029 (diff)
Added by Bartosz Małkowski TigaseTeam almost 2 years ago

Feature #5666: Extended retrieving member list

(cherry picked from commit ff48446)

History

#1 Avatar?id=6098&size=24x24 Updated by Bartosz Małkowski TigaseTeam almost 2 years ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 100

Also available in: Atom PDF