如何使用node-xmpp离开群聊

时间:2015-02-04 13:56:39

标签: node.js xmpp openfire xmppframework node-xmpp

This不起作用。这里cl是谁想要从组中离开的xmpp-client对象。

cl.on('online', function (userData) {
    var userJid = userData.jid.user + '@' + userData.jid.domain + "/" + userData.jid.resource,
    roomJid = params.typeId + params.service + userData.jid.domain + '/' + params.userName;
    pres = new xmpp.Element('presence', {
        from : userJid,
        to   : roomJid,  //54d213e000e9e50c4e8e5a2b@conference.domain/nickName
        type : 'unavailable',
        xmlns : 'jabber:client'
    });
    status = cl.send(pres);
});

0 个答案:

没有答案