User wants to retrieve users with different roles and/or affiliations in single request instead of requesting each role/affiliation separately.
User may add more than one <item/> elements to query.
<item/>
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>
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:
In response MUC will send:
Additionally there is shortcut: instead of listing all roles or affiliation, there is possibility to use keyword @all@: