Make XMPP nickname configurable

This commit is contained in:
Basti 2020-11-27 01:55:34 +01:00
parent d653d184f2
commit 82313c72ea
Signed by untrusted user: basti
GPG Key ID: 9F88009D31D99C72
1 changed files with 2 additions and 1 deletions

View File

@ -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() {