From db602147aba5d9e8cd1e24689653457ad8de1be8 Mon Sep 17 00:00:00 2001 From: Lim Chee Aun Date: Tue, 13 Jun 2023 21:08:59 +0800 Subject: [PATCH] Handle GoToSocial links --- src/utils/isMastodonLinkMaybe.jsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/utils/isMastodonLinkMaybe.jsx b/src/utils/isMastodonLinkMaybe.jsx index 9e070006..809d256b 100644 --- a/src/utils/isMastodonLinkMaybe.jsx +++ b/src/utils/isMastodonLinkMaybe.jsx @@ -1,6 +1,8 @@ export default function isMastodonLinkMaybe(url) { const { pathname } = new URL(url); return ( - /^\/.*\/\d+$/i.test(pathname) || /^\/notes\/[a-z0-9]+$/i.test(pathname) // Misskey, Calckey + /^\/.*\/\d+$/i.test(pathname) || + /^\/@[^/]+\/statuses\/\w+$/i.test(pathname) || // GoToSocial + /^\/notes\/[a-z0-9]+$/i.test(pathname) // Misskey, Calckey ); }