diff --git a/src/modules/fedimbed.js b/src/modules/fedimbed.js index 57d7ed2..951a37c 100644 --- a/src/modules/fedimbed.js +++ b/src/modules/fedimbed.js @@ -115,8 +115,8 @@ async function processUrl(msg, url) { let redirUrl; 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(/@(.+?)\/(\d+)\/?/, "api/v1/statuses/$2"); + } else if (PATH_REGEX.mastodon.test(urlObj.pathname)) { + redirUrl = url.replace(/@(.+?)\//, "api/v1/statuses/"); } else { logger.error( "fedimbed",