如何使用strophe在openfire-xmpp数据库中添加成员


How can i add members in openfire xmpp database using strophe

示例:使用strophe.js向xmpp openfire发送存在和消息。但不将muc成员插入数据库。下方的示例代码

var pres = $pres({to: 'coven@chat.shakespeare.lit/ghywi7'})
           .c("x", { 
                  xmlns: 'http://jabber.org/protocol/muc'
           });
var msg = $msg({to: 'coven@chat.shakespeare.lit'})
        .c("x", {
            xmlns: 'http://jabber.org/protocol/muc#user'
        }).c("invite", {
            to: '1234567890@test.com'
        });
App.connection.send(pres);
App.connection.send(msg);

发送此状态和消息后,无法将其插入到MucMember表的xmpp数据库中

如果您使用的是Strophe,请使用Strophe.NS.MUC而不是'http://jabber.org/protocol/muc'