fedimbed: try 4

This commit is contained in:
Cynthia Foxwell 2025-04-18 18:55:09 -06:00
parent d43f29f2c5
commit 9d6c9450ce
Signed by: Cynosphere
SSH key fingerprint: SHA256:H3SM8ufP/uxqLwKSH7xY89TDnbR9uOHzjLoBr0tlajk

View file

@ -1338,6 +1338,7 @@ async function processUrl(msg, url, spoiler = false, command = false) {
if (platformName == "Twitter") { if (platformName == "Twitter") {
const newHandle = author.handle.split("@")[0]; const newHandle = author.handle.split("@")[0];
author.handle = "@" + newHandle; author.handle = "@" + newHandle;
author.url = author.url.replaceAll(/tw\.(counter-strike\.gay|c7\.pm)/g, "twitter.com");
if (context) { if (context) {
const contextHandle = context.match(/\(([^@]+?@.+?)\)/)?.[1]; const contextHandle = context.match(/\(([^@]+?@.+?)\)/)?.[1];