mirror of
https://github.com/nioc/xmpp-bot.git
synced 2024-11-09 11:41:25 +01:00
Fix typo
This commit is contained in:
parent
48046dbae2
commit
2898b88253
5 changed files with 12 additions and 4 deletions
|
@ -5,7 +5,7 @@ After=network.target
|
|||
|
||||
[Service]
|
||||
User=xmpp-bot
|
||||
WorkingDirectory=/usr/local/bin/xmpp-bot/lib/
|
||||
WorkingDirectory=/usr/local/bin/xmpp-bot/
|
||||
ExecStart=/usr/bin/node /usr/local/bin/xmpp-bot/lib/server.js
|
||||
Restart=on-failure
|
||||
RestartSec=1000ms
|
||||
|
|
|
@ -45,6 +45,7 @@
|
|||
"domain": "domain-xmpp.ltd",
|
||||
"username": "bot@domain-xmpp.ltd",
|
||||
"password": "botPass",
|
||||
"resource": "botservice",
|
||||
"rooms": [
|
||||
{
|
||||
"id": "roomname@conference.domain-xmpp.ltd",
|
||||
|
|
|
@ -15,7 +15,9 @@ module.exports = (logger, xmpp) => {
|
|||
logger.warn(`Received ${exitCode}/${signal} (application is closing), disconnect from XMPP server`)
|
||||
try {
|
||||
xmpp.close()
|
||||
.then(logger.debug('Connection successfully closed'))
|
||||
.then(() => {
|
||||
logger.debug('Connection successfully closed')
|
||||
})
|
||||
.catch((error) => {
|
||||
logger.error('Error during XMPP disconnection', error)
|
||||
})
|
||||
|
|
|
@ -45,7 +45,9 @@ module.exports = (logger, config) => {
|
|||
this.jid = address
|
||||
// send presence
|
||||
xmppClient.send(xml('presence'))
|
||||
.then(logger.debug('presence sent'))
|
||||
.then(() => {
|
||||
logger.debug('presence sent')
|
||||
})
|
||||
.catch((error) => {
|
||||
logger.warn('presence returned following error:', error)
|
||||
})
|
||||
|
@ -139,7 +141,9 @@ module.exports = (logger, config) => {
|
|||
|
||||
// connect
|
||||
xmppClient.start()
|
||||
.catch(logger.error)
|
||||
.catch((error) => {
|
||||
logger.error('XMPP client encountered following error at connection', error)
|
||||
})
|
||||
|
||||
return this
|
||||
}
|
||||
|
|
|
@ -45,6 +45,7 @@
|
|||
"domain": "domain-xmpp.ltd",
|
||||
"username": "bot@domain-xmpp.ltd",
|
||||
"password": "botPass",
|
||||
"resource": "botservice",
|
||||
"rooms": [
|
||||
{
|
||||
"id": "roomname@conference.domain-xmpp.ltd",
|
||||
|
|
Loading…
Reference in a new issue