【发布时间】:2013-12-11 20:38:46
【问题描述】:
您好,我在拒绝邀请加入聊天室时遇到问题。这是我的小节:
var msg = $msg({"from" : tojid,"to" : room}).c("x", {"xmlns" : Strophe.NS.MUC_USER}).c("decline", {"to" : fromjid+"@188.2.16.19"});
msg.c("reason").t("Can talk right now.");
Chat.connection.send(msg.tree());
但这不是第一次发送,邀请也没有被拒绝。它一直在返回。 如果我在发件人端发送两次,我会收到回复:
<body xmlns='http://jabber.org/protocol/httpbind'><message xmlns="jabber:client" from="epthi_702@conference.188.2.16.19" to="nikola_degree361_com@188.2.16.19"><x xmlns="http://jabber.org/protocol/muc#user"><decline from="nikola_pregmatch_org@188.2.16.19"><reason>Can talk right now.</reason></decline></x></message></body>
我也想不出这个处理程序。在 strophe addHandler 中放什么? 我收到了来自组的邀请:
Chat.connection.addHandler(Chat.onInvite,"jabber:x:conference");
【问题讨论】:
标签: javascript jquery xmpp strophe