This plugin inserts the capability of receive an event when a new private messages arrives from a MUC.
Just run yarn add xmpp-groupchat-private-messages
or npm install --save xmpp-groupchat-private-messages
.
This plugin needs no configuration.
For Node/CommonJS:
const GroupChatPrivateMessage = require('xmpp-groupchat-private-messages');
client.use(GroupChatPrivateMessage);
For ES6+:
import GroupChatPrivateMessage from 'xmpp-groupchat-private-messages';
client.use(GroupChatPrivateMessage);
This package enable a new event to subscribe, muc:private:message, and its described above:
client.on('muc:private:message', (message) => {
console.log(message);
});
This plugin is MIT licensed.