fedimbed: xd again

This commit is contained in:
Cynthia Foxwell 2025-07-12 10:43:15 -06:00
parent d745c321b6
commit 9f584e69a8
Signed by: Cynosphere
SSH key fingerprint: SHA256:H3SM8ufP/uxqLwKSH7xY89TDnbR9uOHzjLoBr0tlajk

View file

@ -71,10 +71,9 @@ const BSKY_DOMAINS = [
"xbsky.app",
];
const OWN_TW_DOMAINS = ["tw.c7.pm", "tw.counter-strike.gay", "tw.suicide.watch", "tw1tter.com"];
const TW_DOMAINS = [
"tw.c7.pm",
"tw.counter-strike.gay",
"tw.suicide.watch",
...OWN_TW_DOMAINS,
"xcancel.com",
"lightbrd.com",
"twitter.com",
@ -1005,11 +1004,11 @@ async function processUrl(msg, url, spoiler = false, command = false, inQuote =
let hostname = urlObj.hostname.replace(/^www\./, "");
if (TW_DOMAINS.includes(hostname)) {
if (canTwitter === true) {
urlObj.hostname = "tw.c7.pm";
urlObj.hostname = "tw1tter.com";
url = urlObj.toString();
urlObj.hostname = "twitter.com";
realUrl = urlObj.toString();
hostname = "tw.c7.pm";
hostname = "tw1tter.com";
platform = "Nitter";
}
} else {
@ -1017,7 +1016,7 @@ async function processUrl(msg, url, spoiler = false, command = false, inQuote =
}
if (platform != "Nitter") return {};
if (platform == "Nitter") {
if (hostname != "tw.c7.pm" && hostname != "tw.counter-strike.gay")
if (!OWN_TW_DOMAINS.includes(hostname))
logger.info("fedimbed", `Got new Nitter domain running fork: ${hostname}`);
if (canTwitter === false) return {};
}