From 01847281adbef6242d75056f605511610057cea0 Mon Sep 17 00:00:00 2001 From: Martin Dimitrov Date: Mon, 25 Nov 2024 18:24:09 -0800 Subject: [PATCH] fix usage of notifyAll method --- packages/doorman-client/functions/buzzer-activated.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/doorman-client/functions/buzzer-activated.js b/packages/doorman-client/functions/buzzer-activated.js index 4f27146..96ee908 100644 --- a/packages/doorman-client/functions/buzzer-activated.js +++ b/packages/doorman-client/functions/buzzer-activated.js @@ -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 {