fedimbed: try 2

This commit is contained in:
Cynthia Foxwell 2025-04-18 18:53:26 -06:00
parent 76a5209577
commit 64623bfa74
Signed by: Cynosphere
SSH key fingerprint: SHA256:H3SM8ufP/uxqLwKSH7xY89TDnbR9uOHzjLoBr0tlajk

View file

@ -971,7 +971,7 @@ async function processUrl(msg, url, spoiler = false, command = false) {
if (canTwitter === true) {
urlObj.hostname = "tw.c7.pm";
url = urlObj.toString();
urlObj.hostName = "twitter.com";
urlObj.hostname = "twitter.com";
realUrl = urlObj.toString();
hostname = "tw.c7.pm";
platform = "Nitter";
@ -1291,6 +1291,8 @@ async function processUrl(msg, url, spoiler = false, command = false) {
quoteRes = await processUrl(msg, quoteUrl, spoiler, command);
}
content = content.replaceAll(/tw\.(counter-strike\.gay|c7\.pm)/g, "twitter.com");
}
content = htmlToMarkdown(content);
@ -1343,6 +1345,7 @@ async function processUrl(msg, url, spoiler = false, command = false) {
const newContextHandle = contextHandle.split("@")[0];
context = context.replace(contextHandle, "@" + newContextHandle);
}
context.replaceAll(/tw\.(counter-strike\.gay|c7\.pm)/g, "twitter.com");
}
}