From a4859137fe77940253df325a5478445fdbe9f25c Mon Sep 17 00:00:00 2001 From: m5r Date: Thu, 21 Oct 2021 00:38:37 +0200 Subject: [PATCH] return early when receiving a message for a user on free plan --- app/messages/api/webhook/incoming-message.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/app/messages/api/webhook/incoming-message.ts b/app/messages/api/webhook/incoming-message.ts index fd31773..cccdff7 100644 --- a/app/messages/api/webhook/incoming-message.ts +++ b/app/messages/api/webhook/incoming-message.ts @@ -63,6 +63,7 @@ export default async function incomingMessageHandler(req: BlitzApiRequest, res: // accept the webhook but don't store incoming message // because the organization is on the free plan res.status(200).end(); + return; } const phoneNumber = phoneNumbersWithActiveSub.find((phoneNumber) => {