fix usage of notifyAll method
This commit is contained in:
parent
b0492e7d58
commit
01847281ad
@ -42,7 +42,7 @@ async function notifyDiscord(context, msg, u, optionalJsonStr) {
|
||||
}
|
||||
|
||||
async function notifyAllDiscord(context, config, msg, optionalJsonStr) {
|
||||
return notifyDiscord(context, config.discordUsers.map(() => msg), config.discordUsers, config.discordUsers.map(() => optionalJsonStr).filter(Boolean));
|
||||
return notifyDiscord(context, config.discordUsers.map(() => msg), config.discordUsers, config.discordUsers.map(() => optionalJsonStr || ""));
|
||||
}
|
||||
|
||||
function doorOpenTwiml(twiml, config) {
|
||||
@ -139,8 +139,7 @@ exports.handler = async function(context, event, callback) {
|
||||
await notifyAllDiscord(
|
||||
context,
|
||||
config,
|
||||
`📞 Somebody buzzed the door and it dialed through to fallback phone numbers @ Door "${config.door}"`,
|
||||
undefined
|
||||
`📞 Somebody buzzed the door and it dialed through to fallback phone numbers @ Door "${config.door}"`
|
||||
);
|
||||
resolve(twiml);
|
||||
} else {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user