From 52732847fc555b9fde664d8a3bb438aa9ce5d272 Mon Sep 17 00:00:00 2001 From: m5r Date: Mon, 25 Oct 2021 01:24:13 +0200 Subject: [PATCH] fix response sent to twilio for incoming messages on free plan --- app/messages/api/webhook/incoming-message.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/messages/api/webhook/incoming-message.ts b/app/messages/api/webhook/incoming-message.ts index ad2e96b..442cfde 100644 --- a/app/messages/api/webhook/incoming-message.ts +++ b/app/messages/api/webhook/incoming-message.ts @@ -71,7 +71,8 @@ export default async function incomingMessageHandler(req: BlitzApiRequest, res: if (phoneNumbersWithActiveSub.length === 0) { // accept the webhook but don't store incoming message // because the organization is on the free plan - res.status(200).end(); + res.setHeader("content-type", "text/html"); + res.status(200).send(""); return; }