如何在 asmack 中获取扩展房间信息(包括入住人数、房间主题等)(不加入房间)?我正在使用 getRoomInfo() 方法,它使用 disco#info 协议将数据包发送到服务器:
<iq from='hag66@shakespeare.lit/pda'
id='ik3vs715'
to='coven@chat.shakespeare.lit'
type='get'>
<query xmlns='http://jabber.org/protocol/disco#info'/>
</iq>
问题是,我正在接收标准数据包,没有其他信息:
<iq from='coven@chat.shakespeare.lit'
id='ik3vs715'
to='hag66@shakespeare.lit/pda'
type='result'>
<query xmlns='http://jabber.org/protocol/disco#info'>
<identity
category='conference'
name='A Dark Cave'
type='text'/>
<feature var='http://jabber.org/protocol/muc'/>
<feature var='muc_passwordprotected'/>
<feature var='muc_hidden'/>
<feature var='muc_temporary'/>
<feature var='muc_open'/>
<feature var='muc_unmoderated'/>
<feature var='muc_nonanonymous'/>
</query>
</iq>
我想收到的数据包(带有附加信息)就像在示例中一样:
<iq from='coven@chat.shakespeare.lit'
id='ik3vs715'
to='hag66@shakespeare.lit/pda'
type='result'>
<query xmlns='http://jabber.org/protocol/disco#info'>
<identity
category='conference'
name='A Dark Cave'
type='text'/>
<feature var='http://jabber.org/protocol/muc'/>
<feature var='muc_passwordprotected'/>
<feature var='muc_hidden'/>
<feature var='muc_temporary'/>
<feature var='muc_open'/>
<feature var='muc_unmoderated'/>
<feature var='muc_nonanonymous'/>
<x xmlns='jabber:x:data' type='result'>
<field var='FORM_TYPE' type='hidden'>
<value>http://jabber.org/protocol/muc#roominfo</value>
</field>
<field var='muc#roominfo_description'
label='Description'>
<value>The place for all good witches!</value>
</field>
<field var='muc#roominfo_changesubject'
label='Occupants May Change the Subject'>
<value>true</value>
</field>
<field var='muc#roominfo_contactjid'
label='Contact Addresses'>
<value>crone1@shakespeare.lit</value>
</field>
<field var='muc#roominfo_subject'
label='Current Discussion Topic'>
<value>Spells</value>
</field>
<field var='muc#roomconfig_changesubject'
label='Subject can be modified'>
<value>true</value>
</field>
<field var='muc#roominfo_occupants'
label='Number of occupants'>
<value>3</value>
</field>
<field var='muc#roominfo_ldapgroup'
label='Associated LDAP Group'>
<value>cn=witches,dc=shakespeare,dc=lit</value>
</field>
<field var='muc#roominfo_lang'
label='Language of discussion'>
<value>en</value>
</field>
<field var='muc#roominfo_logs'
label='URL for discussion logs'>
<value>http://www.shakespeare.lit/chatlogs/coven/</value>
</field>
<field var='muc#maxhistoryfetch'
label='Maximum Number of History Messages Returned by Room'>
<value>50</value>
</field>
<field var='muc#roominfo_pubsub'
label='Associated pubsub node'>
<value>xmpp:pubsub.shakespeare.lit?;node=the-coven-node</value>
</field>
</x>
</query>
</iq>
我该怎么做才能获得有关我的房间的更多信息?我正在使用 QuickBlox API 和他们的服务器 谢谢