From 925319b8bb82e9da21c6f4d7907554f5c46a30c2 Mon Sep 17 00:00:00 2001 From: Lim Chee Aun Date: Mon, 2 Sep 2024 21:00:10 +0800 Subject: [PATCH] Fix Threads url regex --- src/utils/isMastodonLinkMaybe.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/isMastodonLinkMaybe.jsx b/src/utils/isMastodonLinkMaybe.jsx index ab18c6d4..753fc3bb 100644 --- a/src/utils/isMastodonLinkMaybe.jsx +++ b/src/utils/isMastodonLinkMaybe.jsx @@ -6,7 +6,7 @@ export default function isMastodonLinkMaybe(url) { /^\/(@[^/]+|users\/[^/]+)\/(statuses|posts)\/\w+\/?$/i.test(pathname) || // GoToSocial, Takahe /^\/notes\/[a-z0-9]+$/i.test(pathname) || // Misskey, Firefish /^\/(notice|objects)\/[a-z0-9-]+$/i.test(pathname) || // Pleroma - /^\/@[^/]+\/post\/[a-z0-9]+$/i.test(pathname) || // Threads + /^\/@[^/]+\/post\/[a-z0-9\-_]+$/i.test(pathname) || // Threads /^\/@[^/]+\/[a-z0-9]+[a-z0-9\-]+[a-z0-9]+$/i.test(pathname) || // Hollo (hostname === 'fed.brid.gy' && pathname.startsWith('/r/http')) || // Bridgy Fed /#\/[^\/]+\.[^\/]+\/s\/.+/i.test(hash) // Phanpy 🫣