Xmpp MUC create room的意外状态节

Xmpp MUC create room的意外状态节,xmpp,ejabberd,xmppframework,multiuserchat,Xmpp,Ejabberd,Xmppframework,Multiuserchat,6E64864A-36AF-4B83-8EF5-6E58C4A6117A当我尝试连续两次创建同一房间时,我会从服务中接收状态节,两次都包含“201”状态代码 这是预期的行为吗?从XEP-0045来看,似乎只有在第一次创建房间时才应该发送201 请帮助我理解这一点。为什么状态代码201同时发送 我如何区分创建新房间与加入现有房间的b/w a 请参见以下顺序: ------第一个请求从这里开始 SEND: <presence to="erik_yo@conference.localhost/G

6E64864A-36AF-4B83-8EF5-6E58C4A6117A当我尝试连续两次创建同一房间时,我会从服务中接收状态节,两次都包含“201”状态代码

这是预期的行为吗?从XEP-0045来看,似乎只有在第一次创建房间时才应该发送201

请帮助我理解这一点。为什么状态代码201同时发送

我如何区分创建新房间与加入现有房间的b/w a

请参见以下顺序:

------第一个请求从这里开始

SEND: <presence to="erik_yo@conference.localhost/GJ">
<x xmlns="http://jabber.org/protocol/muc"/>
<x xmlns="vcard-temp:x:update"><photo/></x></presence>


RECV: <presence xmlns="jabber:client" from="erik_yo@conference.localhost/GJ" to="erik@localhost/imac">
<x xmlns="vcard-temp:x:update"><photo/></x>
<x xmlns="http://jabber.org/protocol/muc#user">
<item jid="erik@localhost/imac" affiliation="owner" role="moderator"/>
<status code="110"/><status code="201"/></x></presence>
SEND: <presence to="erik_yo@conference.localhost/GJ" type="unavailable">
<x xmlns="vcard-temp:x:update"><photo/></x></presence>

SEND: <presence to="erik_yo@conference.localhost/GJ">
<x xmlns="http://jabber.org/protocol/muc"/>
<x xmlns="vcard-temp:x:update"><photo/></x></presence>

RECV: <presence xmlns="jabber:client" from="erik_yo@conference.localhost/GJ" to="erik@localhost/imac" type="unavailable">
<x xmlns="vcard-temp:x:update"><photo/></x><x xmlns="http://jabber.org/protocol/muc#user"><item affiliation="owner" role="none"/>
<status code="110"/></x></presence>

RECV: <presence xmlns="jabber:client" from="erik_yo@conference.localhost/GJ" to="erik@localhost/imac">
<x xmlns="vcard-temp:x:update"><photo/></x>
<x xmlns="http://jabber.org/protocol/muc#user">
<item jid="erik@localhost/imac" affiliation="owner" role="moderator"/><status code="110"/><status code="201"/></x></presence>
发送:
记录:
//在此处配置文件室
//
发送:

进入房间并获得201状态代码后,您应该接受默认配置或显式配置房间(请参阅)。如果在执行上述任一操作之前发送不可用状态,服务器将销毁该房间。因此,在您的示例中,房间实际上两次都是“新创建的”


此外,对于某些服务器,文件室的默认设置为“临时”,即当最后一个参与者离开时,文件室将被销毁。您可能希望将其配置为“持久化文件室”,以便其保持不变。

哪个软件提供MUC组件?程序中的ejabberd mod_MUC looks就像我必须默认的_room_选项:persistent:true to ejabberd config…然后我不会获得第二个请求的201。我将调查为什么客户端的配置不起作用…接受澄清的答案DidReceivePresence-在配置房间后,我将得到状态代码303作为回报。你能帮我一下吗@legoscia@GaganJoshi您可以在此处找到数字状态代码列表:@Legossia感谢您的帮助。你能告诉我吗。如果我邀请一个用户。被邀请的用户还必须配置房间。配置后解锁房间的概念是什么。提前感谢您可以在XEP-0045的第10.1节中找到相关说明:
SEND: <iq type="set" to="erik_yo@conference.localhost" id="6E64864A-36AF-4B83-8EF5-6E58C4A6117A">
<query xmlns="http://jabber.org/protocol/muc#owner"><x .........

RECV: <iq xmlns="jabber:client" from="yo@conference.localhost" 
to="erik@localhost/imac" id="6E64864A-36AF-4B83-8EF5-6E58C4A6117A" type="result">
<query xmlns="http://jabber.org/protocol/muc#owner"/></iq>
SEND: <presence to="erik_yo@conference.localhost/GJ" type="unavailable">
<x xmlns="vcard-temp:x:update"><photo/></x></presence>

SEND: <presence to="erik_yo@conference.localhost/GJ">
<x xmlns="http://jabber.org/protocol/muc"/>
<x xmlns="vcard-temp:x:update"><photo/></x></presence>

RECV: <presence xmlns="jabber:client" from="erik_yo@conference.localhost/GJ" to="erik@localhost/imac" type="unavailable">
<x xmlns="vcard-temp:x:update"><photo/></x><x xmlns="http://jabber.org/protocol/muc#user"><item affiliation="owner" role="none"/>
<status code="110"/></x></presence>

RECV: <presence xmlns="jabber:client" from="erik_yo@conference.localhost/GJ" to="erik@localhost/imac">
<x xmlns="vcard-temp:x:update"><photo/></x>
<x xmlns="http://jabber.org/protocol/muc#user">
<item jid="erik@localhost/imac" affiliation="owner" role="moderator"/><status code="110"/><status code="201"/></x></presence>
 SEND: <iq type="set" to="erik_yo@conference.localhost" id="C72C4629-B318-4733-884B-B6A8BEAFB50F">
<query xmlns="http://jabber.org/protocol/muc#owner"> 
<x xmlns="jabber:x:data" type="submit"><field type="hidden" var="FORM_TYPE"><value>http://jabber.org/protocol/muc#roomconfig</value> <field type="boolean" var="muc#roomconfig_enable_logging" value="1"/> 
<field type="text-single" var="muc#roomconfig_roomname" value="IdeaFactory"/> <field type="boolean" var="muc#roomconfig_membersonly" value="1"/> 
<field type="boolean" var="muc#roomconfig_moderatedroom" value="0"/> 
<field type="boolean" var="muc#roomconfig_persistentroom" value="1"/> <field type="boolean" var="muc#roomconfig_publicroom" value="0"/> <field type="text-single" var="muc#roomconfig_maxusers" value="10"/> <field type="jid-multi" var="muc#roomconfig_roomowners" value="erik@localhost"/> <field type="boolean" var="muc#roomconfig_changesubject" value="1"/></field></x> </query></iq>