Make XMPP nickname configurable
This commit is contained in:
parent
d653d184f2
commit
82313c72ea
@ -3,6 +3,7 @@ const xmpp = require('simple-xmpp');
|
||||
|
||||
const hubotRooms = process.env.HUBOT_IRC_ROOMS.split(',');
|
||||
const xmppRooms = process.env.HUBOT_WORMHOLE_XMPP_ROOMS.split(',');
|
||||
const xmppNickname = process.env.HUBOT_WORMHOLE_XMPP_NICKNAME;
|
||||
|
||||
const xmppConfig = {
|
||||
jid: process.env.HUBOT_WORMHOLE_XMPP_JID,
|
||||
@ -16,7 +17,7 @@ module.exports = function (robot) {
|
||||
xmpp.on('online', function(data) {
|
||||
robot.logger.info('XMPP connected with JID: ' + data.jid.toString());
|
||||
|
||||
xmppRooms.forEach(room => xmpp.join(`${room}/wormholedev`));
|
||||
xmppRooms.forEach(room => xmpp.join(`${room}/${xmppNickname}`));
|
||||
});
|
||||
|
||||
xmpp.on('close', function() {
|
||||
|
Loading…
Reference in New Issue
Block a user