XMPP MUC加入时返回错误代码404,但是它存在 [英] XMPP MUC returns error code 404 when joining, but it exists

查看:64
本文介绍了XMPP MUC加入时返回错误代码404,但是它存在的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

希望有人可以帮助我理解此错误代码404,当我尝试加入已经存在的公共MUC会议室时。

Hoping somebody can help me make sense of this Error code 404 I'm getting when attempting to join a public MUC room that already exists.

这里是XMPP序列:


  1. 在房间上执行IQ查询

  1. Perform IQ Query on room

<iq from='bridgetest1@jabber.org/BridgeClient' id='0da67229d8f55e3b' 
to='sdfsdfsdf@conference.jabber.org' type='get'> 
  <query xmlns='http://jabber.org/protocol/disco#info'/>
</iq>


  • 来自IQ查询的响应

  • Response from IQ Query

    <iq from='sdfsdfsdf@conference.jabber.org' to='bridgetest1@jabber.org/BridgeClient' type='result' id='0da67229d8f55e3b'>
    <query xmlns='http://jabber.org/protocol/disco#info'>
        <identity category='conference' name='sdfsdfsdf' type='text'/>
        <feature var='http://jabber.org/protocol/muc'/>
        <feature var='http://jabber.org/protocol/muc#unique'/>
        <feature var='muc_temporary'/><feature var='muc_open'/>
        <feature var='muc_public'/><feature var='muc_unsecured'/>
        <feature var='muc_temporary'/><feature var='muc_anonymous'/>
      <x xmlns='jabber:x:data' type='result'>
        <field var='FORM_TYPE' type='hidden'>
          <value>http://jabber.org/protocol/muc#roominfo</value>
        </field>
        <field label='Subject Modifiable' var='muc#roominfo_subjectmod' type='boolean'>
          <value>0</value>
         </field><field label='Current Occupants' var='muc#roominfo_occupants' type='text-single'>
          <value>1</value>
         </field>
      </x>
    </query></iq>
    


  • 尝试使用在线状态加入会议室

  • Attempt to join room using Presence

    <presence from='bridgetest1@jabber.org/BridgeClient' id='0da67229d8f55e3b' to='sdfsdfsdf@conference.jabber.org/bbbb'>
       <x xmlns='http://jabber.org/protocol/muc'/>
    </presence>
    


  • 加入响应(错误404)

  • Join Response (Error 404)

    <presence from='sdfsdfsdf@conference.jabber.org' to='bridgetest1@jabber.org/BridgeClient' type='error' id='0da67229d8f55e3b'>
    <x xmlns='http://jabber.org/protocol/muc'/>
       <error code='404' type='cancel'>
         <item-not-found xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
       </error>
    </presence>
    


  • 有人知道我为什么不能加入吗房间?我只是通过较早加入它而创建了该临时房间,但是加入后,即使智商结果显示它是'muc_open',我也无法返回。

    Does anybody know why I can't join the room? I just created that temporary room by joining it earlier, but after I've joined it I cannot get back in, even though the IQ results show it being 'muc_open'.

    推荐答案

    更新:我正在审查MUC XEP-0045文档,发现以下段落解释了我的问题。

    Update: I was reviewing the MUC XEP-0045 document and found the following passage that explains my issue.

    http://xmpp.org/extensions/xep-0045.html#createroom-instant

    我没有意识到仅仅加入一个房间并不能完成该过程,您仍然必须告诉服务器您要接受即时房间的所有默认设置

    I did not realize that simply joining a room did not complete the process, you still have to tell the server that you want to accept all default settings with the instant room portion, otherwise it remains locked.

    记录下来,在创建房间(并成为所有者)后发送下面的代码段即可解决我的问题。

    For the record, sending the snippet below after creating the room (and being the owner) solves my problem.

        <iq from='crone1@shakespeare.lit/desktop'
            id='create1'
            to='coven@chat.shakespeare.lit'
            type='set'>
            <query xmlns='http://jabber.org/protocol/muc#owner'>
                <x xmlns='jabber:x:data' type='submit'/>
            </query>
        </iq>
    

    这篇关于XMPP MUC加入时返回错误代码404,但是它存在的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

    查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆