to parameter is now an array of xmpp address

This commit is contained in:
wescoeur 2015-12-02 15:27:51 +01:00
parent 9983407c8b
commit 8d8bf43b46

View File

@ -67,9 +67,11 @@ class TransportXmppPlugin {
}
_sendToXmppClient ({to, message}) {
const stanza = new XmppClient.Stanza('message', { to: to, type: 'chat' })
.c('body').t(message)
this._client.send(stanza)
for (const receiver of to) {
const stanza = new XmppClient.Stanza('message', { to: receiver, type: 'chat' })
.c('body').t(message)
this._client.send(stanza)
}
}
}