2017-10-14 137 views
0

我试图在Mongoseim Server的iOS应用程序中实现muc light。群聊我使用muclight但是当我通过我的发现服务:Muc light not working due to service not available

let toStr: String = XMPPConstants.ConnectionHost // my xmpp connection host 

     let query = XMLElement(name: "query", xmlns: "http://jabber.org/protocol/disco#item") 
     let iq = XMPPIQ(type: "get", to: XMPPJID(string: toStr), elementID: xmppStream.generateUUID(), child: query) 
     iq?.addAttribute(withName: "from", stringValue: xmppStream.myJID.bare()) 


     xmppStream.send(iq) 

我收到错误,如响应:

<error type='cancel'> 
    <service-unavailable xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/> 
    </error> 

请帮助我如何解决这个错误。 我是否需要配置服务器部件或其他东西?

请详细解释。

感谢提前:)

回答

0

您需要配置ejabberd.cfg文件mucLight.file可以发现ID [MongooseIM root]/rel/mongooseim/etc/

{mod_muc_light, [ 
    {backend, odbc}, 
    {host, "[email protected]@"}, 
    {rooms_per_user,infinity}, 
    {max_occupants,infinity}, 
    {rooms_per_page,infinity}, 
    {all_can_configure,true},{all_can_invite, true}]}, 

更多信息,请点击此链接mod_muc_light