fedimbed: more nitter specific overrides

This commit is contained in:
Cynthia Foxwell 2025-04-17 23:08:43 -06:00
parent 6e67b73545
commit 16b129a875
Signed by: Cynosphere
SSH key fingerprint: SHA256:H3SM8ufP/uxqLwKSH7xY89TDnbR9uOHzjLoBr0tlajk

View file

@ -1454,7 +1454,7 @@ async function processUrl(msg, url, spoiler = false, command = false) {
} }
} }
const user = author.name ? `${author.name} (${author.handle})` : author.handle; let user = author.name ? `${author.name} (${author.handle})` : author.handle;
const crawled = await getCrawledData(url, color, platformName); const crawled = await getCrawledData(url, color, platformName);
if (!color && crawled?.color) { if (!color && crawled?.color) {
@ -1470,6 +1470,11 @@ async function processUrl(msg, url, spoiler = false, command = false) {
platformName = nn; platformName = nn;
} }
if (platformName == "Nitter") {
const newHandle = author.handle.split("@")[0];
user = `${author.name} (@${newHandle})`;
}
const baseEmbed = { const baseEmbed = {
color, color,
url, url,