Unfurl BotKit/Fedify links

This commit is contained in:
Lim Chee Aun 2025-01-15 18:02:16 +08:00
parent 4324139e9c
commit 61485413b6

View file

@ -8,6 +8,7 @@ export default function isMastodonLinkMaybe(url) {
/^\/(notice|objects)\/[a-z0-9-]+$/i.test(pathname) || // Pleroma
/^\/@[^/]+\/post\/[a-z0-9\-_]+$/i.test(pathname) || // Threads
/^\/@[^/]+\/[a-z0-9]+[a-z0-9\-]+[a-z0-9]+$/i.test(pathname) || // Hollo
/^\/ap\/note\/[a-z0-9\-_]+$/i.test(pathname) || // BotKit, Fedify
(hostname === 'fed.brid.gy' && pathname.startsWith('/r/http')) || // Bridgy Fed
/#\/[^\/]+\.[^\/]+\/s\/.+/i.test(hash) // Phanpy 🫣
);