fedimbed: fix mastodon fallback

This commit is contained in:
Cynthia Foxwell 2022-12-05 21:12:50 -07:00
parent c689c7c5d5
commit 9d924813f3
1 changed files with 1 additions and 1 deletions

View File

@ -116,7 +116,7 @@ async function processUrl(msg, url) {
if (PATH_REGEX.pleroma2.test(urlObj.pathname)) {
redirUrl = url.replace("notice", "api/v1/statuses");
} else if (PATH_REGEX.mastodon.test(urlObj.pathName)) {
redirUrl = url.replace(/@(.+?)\//, "api/v1/statuses/");
redirUrl = url.replace(/@(.+?)\/(\d+)\/?/, "api/v1/statuses/$2");
} else {
logger.error(
"fedimbed",