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;
|
let redirUrl;
|
||||||
if (PATH_REGEX.pleroma2.test(urlObj.pathname)) {
|
if (PATH_REGEX.pleroma2.test(urlObj.pathname)) {
|
||||||
redirUrl = url.replace("notice", "api/v1/statuses");
|
redirUrl = url.replace("notice", "api/v1/statuses");
|
||||||
} else if (PATH_REGEX.mastodon.test(urlObj.pathName)) {
|
} else if (PATH_REGEX.mastodon.test(urlObj.pathname)) {
|
||||||
redirUrl = url.replace(/@(.+?)\/(\d+)\/?/, "api/v1/statuses/$2");
|
redirUrl = url.replace(/@(.+?)\//, "api/v1/statuses/");
|
||||||
} else {
|
} else {
|
||||||
logger.error(
|
logger.error(
|
||||||
"fedimbed",
|
"fedimbed",
|
||||||
|
|
Loading…
Reference in a new issue