Commit
b2a835600625377b4bdd59200c50bf64eaf77ab8
Register bot for custom-ping on connected
Showing
2 changed files
with
6 additions
and
0 deletions
Side-by-side Diff
... |
... |
@@ -14,6 +14,7 @@ const allowedFromPartnerList = ( |
14
|
14 |
.filter((item) => item); |
15
|
15 |
|
16
|
16 |
const setBot = (botFromCaller) => { |
|
17 |
+ logger.verbose(`${MODULE_NAME} A063F39F: Bot registered for custom ping`); |
17
|
18 |
bot = botFromCaller; |
18
|
19 |
}; |
19
|
20 |
exports.setBot = setBot; |
... |
... |
@@ -13,6 +13,11 @@ let isReady; |
13
|
13 |
|
14
|
14 |
bot.on('online', (data) => { |
15
|
15 |
logger.info(`XMPP transport connected, JID: ${data.jid.user}`); |
|
16 |
+ |
|
17 |
+ if (config.custom_ping) { |
|
18 |
+ customPing.setBot(bot); |
|
19 |
+ } |
|
20 |
+ |
16
|
21 |
bot.getRoster(); |
17
|
22 |
|
18
|
23 |
setTimeout( |