有没有办法获得带有ejabberd服务器的MUC Room的所有昵称?
我正在尝试:
<iq from='crone1@shakespeare.lit/desktop'
id='member3'
to='coven@chat.shakespeare.lit'
type='get'>
<query xmlns='http://jabber.org/protocol/muc#admin'>
<item affiliation='member'/>
</query>
</iq>
但我只获得没有昵称的jid:
<iq from='coven@chat.shakespeare.lit'
id='member3'
to='crone1@shakespeare.lit/desktop'
type='result'>
<query xmlns='http://jabber.org/protocol/muc#admin'>
<item affiliation='member'
jid='hag66@shakespeare.lit'
role='participant'/>
</query>
</iq>
答案 0 :(得分:1)
发送时6.5 Querying for Room Items XEP 0045
<iq from='$user-name@$user-server/$user-resorce'
id='someid'
to='$chat-room-to-query@$chatserver'
type='get'>
<query xmlns='http://jabber.org/protocol/disco#items'/>
</iq>
您有以下说明
如果该信息公开可用,则 MAY 会返回现有占用者列表,如果此信息保密,则不返回任何列表。(强调我的)
如果房间是公开的,你会得到
<iq from='$chat-room-to-query@$chatserver'
id='someid'
to='$user-name@$user-server/$user-resorce'
type='result'>
<query xmlns='http://jabber.org/protocol/disco#items'>
<item jid='$chat-room-to-query@$chatserver/$firstnick'/>
<item jid='$chat-room-to-query@$chatserver/$secondnick'/>
<...>
</query>
</iq>
据我所知,ejabberd正确实现了这一点。