fedimbed: xd again
This commit is contained in:
		
							parent
							
								
									d745c321b6
								
							
						
					
					
						commit
						9f584e69a8
					
				
					 1 changed files with 5 additions and 6 deletions
				
			
		| 
						 | 
				
			
			@ -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 {};
 | 
			
		||||
    }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue