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) {
|
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) {
|
function doorOpenTwiml(twiml, config) {
|
||||||
@ -139,8 +139,7 @@ exports.handler = async function(context, event, callback) {
|
|||||||
await notifyAllDiscord(
|
await notifyAllDiscord(
|
||||||
context,
|
context,
|
||||||
config,
|
config,
|
||||||
`📞 Somebody buzzed the door and it dialed through to fallback phone numbers @ Door "${config.door}"`,
|
`📞 Somebody buzzed the door and it dialed through to fallback phone numbers @ Door "${config.door}"`
|
||||||
undefined
|
|
||||||
);
|
);
|
||||||
resolve(twiml);
|
resolve(twiml);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user