【发布时间】:2014-10-31 22:36:00
【问题描述】:
我找不到手册如何加入聊天室和发送/接收消息?
我使用 Strophe + openFire。
我如何发送消息:
var o = {from : 'test2@xmpp.local/5c5d4956', to:'1@conference.xmpp.local', type : 'groupchat', xmlns : Strophe.NS.MUC};
var m = $msg(o);
m.c('body', null, 'body text');
connection.send(m.tree());
我如何收到:
<body xmlns='http://jabber.org/protocol/httpbind'>
<message xmlns="jabber:client" xmlns="http://jabber.org/protocol/muc" from="1@conference.xmpp.local" to="test2@xmpp.local/77ce8c0e" type="error"> <body>dfsdfsdfsd</body><error xmlns="" code="406" type="modify"><not-acceptable xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/></error></message></body>
【问题讨论】:
标签: join xmpp openfire strophe chatroom