mirror of
https://github.com/nioc/xmpp-bot.git
synced 2024-12-04 22:23:36 +01:00
Reply to XMPP when outgoing webhook fails
This commit is contained in:
parent
1973c060aa
commit
a99008b984
3 changed files with 5 additions and 0 deletions
|
@ -46,6 +46,7 @@
|
|||
"username": "bot@domain-xmpp.ltd",
|
||||
"password": "botPass",
|
||||
"resource": "botservice",
|
||||
"errorReply": "Oops, something went wrong :(",
|
||||
"rooms": [
|
||||
{
|
||||
"id": "roomname@conference.domain-xmpp.ltd",
|
||||
|
|
|
@ -135,6 +135,9 @@ module.exports = (logger, config) => {
|
|||
case 'outgoing_webhook':
|
||||
logger.debug(`Call outgoing webhook: ${xmppHook.args[0]}`)
|
||||
outgoing(logger, config, this, from.toString(), replyTo.toString(), message, type, xmppHook.args[0])
|
||||
.catch(() => {
|
||||
this.send(replyTo.toString(), config.xmpp.errorReply, type)
|
||||
})
|
||||
break
|
||||
default:
|
||||
break
|
||||
|
|
|
@ -46,6 +46,7 @@
|
|||
"username": "bot@domain-xmpp.ltd",
|
||||
"password": "botPass",
|
||||
"resource": "botservice",
|
||||
"errorReply": "Oops, something went wrong :(",
|
||||
"rooms": [
|
||||
{
|
||||
"id": "roomname@conference.domain-xmpp.ltd",
|
||||
|
|
Loading…
Reference in a new issue