fedimbed: fix nitter not getting replaced to twitter when no stats
This commit is contained in:
parent
deafb62ca2
commit
9c7e888f05
1 changed files with 12 additions and 10 deletions
|
@ -1375,7 +1375,8 @@ async function processUrl(msg, url, spoiler = false, command = false, inQuote =
|
|||
platformName = crawled.platformName;
|
||||
}
|
||||
|
||||
if (platformName.includes("Nitter") && platformName.includes(" \u2022 ")) {
|
||||
if (platformName.includes("Nitter")) {
|
||||
if (platformName.includes(" \u2022 ")) {
|
||||
const [_, ns] = platformName.split(" \u2022 ");
|
||||
stats = ns
|
||||
.replace("\u21a9", Icons.fedimbed.reply)
|
||||
|
@ -1385,6 +1386,7 @@ async function processUrl(msg, url, spoiler = false, command = false, inQuote =
|
|||
.replace("\ud83d\udd16", Icons.fedimbed.bookmark)
|
||||
.replace("\ud83d\udc41", Icons.fedimbed.views)
|
||||
.replaceAll(/ <:(\w):/g, "\u3000<:$1:");
|
||||
}
|
||||
platformName = "Twitter";
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue