diff --git a/src/modules/fedimbed.js b/src/modules/fedimbed.js index 620f0f1..3230748 100644 --- a/src/modules/fedimbed.js +++ b/src/modules/fedimbed.js @@ -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"); } }