fedimbed: fix mastodon fallback try 2
This commit is contained in:
parent
9d924813f3
commit
643cfa4501
1 changed files with 2 additions and 2 deletions
|
@ -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",
|
||||
|
|
Loading…
Reference in a new issue