summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Tuomi <jans.tuomi@gmail.com>2024-03-15 15:32:11 +0200
committerJan Tuomi <jans.tuomi@gmail.com>2024-03-15 15:32:11 +0200
commit4781eda76880886cee2858de66d7445eb13ff252 (patch)
tree23a471ecb4e956b497599eb959dba7f068e10c9e
parente3d978605a3c2d31a1fb9fe8d43eacf02a377c67 (diff)
Allow more url formats
-rw-r--r--src/index.ts10
1 files 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,