From 7ccc8a29ae2c4a219e8c2ca62d3c13ccaa267702 Mon Sep 17 00:00:00 2001 From: mythilytm Date: Thu, 24 Oct 2024 09:54:01 -0400 Subject: [PATCH] Add support for both facebook and messenger --- functions/getProfileFlagsForIdentifier.protected.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/functions/getProfileFlagsForIdentifier.protected.ts b/functions/getProfileFlagsForIdentifier.protected.ts index c4d1dd8d..6cc9cc4e 100644 --- a/functions/getProfileFlagsForIdentifier.protected.ts +++ b/functions/getProfileFlagsForIdentifier.protected.ts @@ -89,11 +89,12 @@ const trimHyphens = (s: string) => s.replaceAll('-', ''); const phoneNumberStandardization = (s: string) => [trimSpaces, trimHyphens].reduce((accum, f) => f(accum), s); type TransformIdentifierFunction = (c: string) => string; -const channelTransformations: { [k in string]: TransformIdentifierFunction[] } = { +const channelTransformations: { [k: string]: TransformIdentifierFunction[] } = { voice: [phoneNumberStandardization], sms: [phoneNumberStandardization], whatsapp: [(s) => s.replace('whatsapp:', ''), phoneNumberStandardization], modica: [(s) => s.replace('modica:', ''), phoneNumberStandardization], + facebook: [(s) => s.replace('messenger:', '')], messenger: [(s) => s.replace('messenger:', '')], instagram: [], line: [],