2016-11-16 33 views
0

似乎有一些线程围绕此和看起来非常明显的问题是一个问题,但不知何故在我的ejabberd移动客户端创建的MUC /房间,创建者/所有者能够获取成员列表,但是当我从成员中获取相同成员时,会出现管理权限错误。获取ejabberd MUC成员名单

下面是请求和响应段落以及房间选项。如果有什么我可以在这里忽略的话,有人可以提出建议吗?非常感谢?从成员

请求:

<iq 
    type="get" 
    to="1479313326166_what%20a%[email protected]" 
    id="7BB7F8C8-B47F-4C0C-9E4D-8CAC3A5287FF"> 
    <query xmlns="http://jabber.org/protocol/muc#admin"> 
     <item 
     affiliation="member"> 
     </item> 
    </query> 
</iq> 

响应成员:

<iq xmlns="jabber:client" 
    from="1479313326166_what%20a%[email protected]" 
    to="[email protected]/9A36B83F-0B1B-484E-BFB2-C0F1C7148274" 
    id="7BB7F8C8-B47F-4C0C-9E4D-8CAC3A5287FF" 
    type="error"> 
    <query xmlns="http://jabber.org/protocol/muc#admin"> 
     <item affiliation="member"></item> 
    </query> 
    <error code="403" type="auth"> 
     <forbidden xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"></forbidden> 
     <text xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"> 
     Administrator privileges required 
     </text> 
    </error> 
</iq> 

间选择:

> /sbin/ejabberdctl get_room_options 1479313326166_what%20a%20day conference.example.com 
title 
description 
allow_change_subj true 
allow_query_users true 
allow_private_messages true 
allow_private_messages_from_visitors anyone 
allow_visitor_status true 
allow_visitor_nickchange true 
public true 
public_list true 
persistent true 
moderated true 
captcha_protected false 
members_by_default true 
members_only true 
allow_user_invites false 
allow_subscription true 
password_protected false 
password  
anonymous true 
presence_broadcast [moderator,participant,visitor] 
allow_voice_requests true 
voice_request_min_interval 1800 
max_users 200 
logging false 
vcard <vCard xmlns='vcard-temp'><NICKNAME>What a day</NICKNAME><NOTE/></vCard> 
captcha_whitelist {0,nil} 
mam false 
+0

检查这个线程,http://stackoverflow.com/questions/40574609/members-cannot-get-member-list-in-a-muc-room/40598827,海报有类似的问题,并提到有关CocoaPods问题,看看你是否可以问他。 – dichen

+0

感谢@dichen ...害怕我甚至没有通过podfile使用XMPPFramework - 我直接整合了代码。另外,我的流程已经是您提到的方式,即配置表单在roomDidCreate中获取,configureThisRoom在didFetchConfig表单中调用,邀请在didConfigure中发送! – vikram17000

回答

1

我试着配置一个房间,通过ConfigurationForm和ServerDefaultConfig,算命从未得到你的错误,fetchMembers总是正常工作。可能有一些很难找到的非常愚蠢的东西。也许尝试清除数据库或重新启动服务器重新开始。

<x xmlns=\"jabber:x:data\" type=\"form\"> 
     <title>Configuration of room [email protected]</title> 
     <field type=\"hidden\" var=\"FORM_TYPE\"> 
     <value>http://jabber.org/protocol/muc#roomconfig</value> 
     </field> 
     <field type=\"text-single\" label=\"Room title\" var=\"muc#roomconfig_roomname\"> 
     <value></value> 
     </field> 
     <field type=\"text-single\" label=\"Room description\" var=\"muc#roomconfig_roomdesc\"> 
     <value></value> 
     </field> 
     <field type=\"boolean\" label=\"Make room persistent\" var=\"muc#roomconfig_persistentroom\"> 
     <value>1</value> 
     </field> 
     <field type=\"boolean\" label=\"Make room public searchable\" var=\"muc#roomconfig_publicroom\"> 
     <value>0</value> 
     </field> 
     <field type=\"boolean\" label=\"Make participants list public\" var=\"public_list\"> 
     <value>0</value> 
     </field> 
     <field type=\"boolean\" label=\"Make room password protected\" var=\"muc#roomconfig_passwordprotectedroom\"> 
     <value>0</value> 
     </field> 
     <field type=\"text-private\" label=\"Password\" var=\"muc#roomconfig_roomsecret\"> 
     <value></value> 
     </field> 
     <field type=\"list-single\" label=\"Maximum Number of Occupants\" var=\"muc#roomconfig_maxusers\"> 
     <value>200</value> 
     <option label=\"5\"> 
      <value>5</value> 
     </option> 
     <option label=\"10\"> 
      <value>10</value> 
     </option> 
     <option label=\"20\"> 
      <value>20</value> 
     </option> 
     <option label=\"30\"> 
      <value>30</value> 
     </option> 
     <option label=\"50\"> 
      <value>50</value> 
     </option> 
     <option label=\"100\"> 
      <value>100</value> 
     </option> 
     <option label=\"200\"> 
      <value>200</value> 
     </option> 
     </field> 
     <field type=\"list-single\" label=\"Present real Jabber IDs to\" var=\"muc#roomconfig_whois\"> 
     <option label=\"moderators only\"> 
      <value>moderators</value> 
     </option> 
     <option label=\"anyone\"> 
      <value>anyone</value> 
     </option> 
     <value>anyone</value> 
     </field> 
     <field type=\"list-multi\" label=\"Roles for which Presence is Broadcasted\" var=\"muc#roomconfig_presencebroadcast\"> 
     <value>moderator</value> 
     <value>participant</value> 
     <value>visitor</value> 
     <option label=\"Moderator\"> 
      <value>moderator</value> 
     </option> 
     <option label=\"Participant\"> 
      <value>participant</value> 
     </option> 
     <option label=\"Visitor\"> 
      <value>visitor</value> 
     </option> 
     </field> 
     <field type=\"boolean\" label=\"Make room members-only\" var=\"muc#roomconfig_membersonly\"> 
     <value>1</value> 
     </field> 
     <field type=\"boolean\" label=\"Make room moderated\" var=\"muc#roomconfig_moderatedroom\"> 
     <value>0</value> 
     </field> 
     <field type=\"boolean\" label=\"Default users as participants\" var=\"members_by_default\"> 
     <value>1</value> 
     </field> 
     <field type=\"boolean\" label=\"Allow users to change the subject\" var=\"muc#roomconfig_changesubject\"> 
     <value>1</value> 
     </field> 
     <field type=\"boolean\" label=\"Allow users to send private messages\" var=\"allow_private_messages\"> 
     <value>1</value> 
     </field> 
     <field type=\"list-single\" label=\"Allow visitors to send private messages to\" var=\"allow_private_messages_from_visitors\"> 
     <value>anyone</value> 
     <option label=\"nobody\"> 
      <value>nobody</value> 
     </option> 
     <option label=\"moderators only\"> 
      <value>moderators</value> 
     </option> 
     <option label=\"anyone\"> 
      <value>anyone</value> 
     </option> 
     </field> 
     <field type=\"boolean\" label=\"Allow users to query other users\" var=\"allow_query_users\"> 
     <value>1</value> 
     </field> 
     <field type=\"boolean\" label=\"Allow users to send invites\" var=\"muc#roomconfig_allowinvites\"> 
     <value>1</value> 
     </field> 
     <field type=\"boolean\" label=\"Allow visitors to send status text in presence updates\" var=\"muc#roomconfig_allowvisitorstatus\"> 
     <value>1</value> 
     </field> 
     <field type=\"boolean\" label=\"Allow visitors to change nickname\" var=\"muc#roomconfig_allowvisitornickchange\"> 
     <value>1</value> 
     </field> 
     <field type=\"boolean\" label=\"Allow visitors to send voice requests\" var=\"muc#roomconfig_allowvoicerequests\"> 
     <value>1</value> 
     </field> 
     <field type=\"text-single\" label=\"Minimum interval between voice requests (in seconds)\" var=\"muc#roomconfig_voicerequestmininterval\"> 
     <value>1800</value> 
     </field> 
     <field type=\"jid-multi\" label=\"Exclude Jabber IDs from CAPTCHA challenge\" var=\"muc#roomconfig_captcha_whitelist\"></field> 
    </x> 

mod_muc: 
    ## host: "[email protected]@" 
    access: 
     - allow 
    access_admin: 
     - allow: admin 
    access_create: muc_create 
    access_persistent: muc_create 
    history_size: 0 
    default_room_options: 
     allow_user_invites: true 
     anonymous: false 
     members_by_default: true 
     members_only: true 
     moderated: false 
     persistent: true 
     public: false 
     public_list: false 
+0

嗯...让我尝试一下,然后......但很多感谢@dichen你的帮助...... !!!非常感谢... – vikram17000

+0

再次感谢@dichen - 修正了它 - 这是roomconfig_whois参数必须切换到任何人,正如您在其他线程中提到的那样!谢谢! – vikram17000