From 4781eda76880886cee2858de66d7445eb13ff252 Mon Sep 17 00:00:00 2001 From: Jan Tuomi Date: Fri, 15 Mar 2024 15:32:11 +0200 Subject: Allow more url formats --- src/index.ts | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/index.ts b/src/index.ts index 1bf8d6e..a168e95 100644 --- a/src/index.ts +++ b/src/index.ts @@ -70,10 +70,7 @@ app.command("/veeti", async ({ command, ack, respond, client }) => { }); }; - if ( - url.startsWith("https://instagram.com") || - url.startsWith("https://www.instagram.com") - ) { + if (url.includes("instagram.com")) { void respond({ text: "Sharing instagram video, this can take a minute...", thread_ts: command.ts, @@ -86,10 +83,7 @@ app.command("/veeti", async ({ command, ack, respond, client }) => { respondWithFile, respondTaskFailed, }); - } else if ( - url.startsWith("https://www.tiktok.com") || - url.startsWith("https://tiktok.com") - ) { + } else if (url.includes("tiktok.com")) { void respond({ text: "Sharing tiktok video, this can take a minute...", thread_ts: command.ts, -- cgit v1.3