summary refs log tree commit diff
diff options
context:
space:
mode:
authorRory& <root@rory.gay>2026-03-14 05:45:38 +0100
committerRory& <root@rory.gay>2026-03-14 05:45:38 +0100
commitf641215a0d420e9800f3f2d5c24308c413aa3abd (patch)
treeb39c89b90ed34c61140cb48522a3203a6d7ca7fb
parentShorten imports (diff)
downloadserver-ts-f641215a0d420e9800f3f2d5c24308c413aa3abd.tar.xz
remove duplicate / in url regex
-rw-r--r--src/api/util/handlers/Message.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/api/util/handlers/Message.ts b/src/api/util/handlers/Message.ts

index a42b7e59..bd0f7f2e 100644 --- a/src/api/util/handlers/Message.ts +++ b/src/api/util/handlers/Message.ts
@@ -56,7 +56,7 @@ const allow_empty = false; // TODO: check webhook, application, system author, stickers // TODO: embed gifs/videos/images -const LINK_REGEX = /<?https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_+.~#?&//=]*)>?/g; +const LINK_REGEX = /<?https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_+.~#?&/=]*)>?/g; export async function handleMessage(opts: MessageOptions): Promise<Message> { const channel = await Channel.findOneOrFail({