diff --git a/.env.example b/.env.example index d99c76f..ab64e41 100644 --- a/.env.example +++ b/.env.example @@ -1,10 +1,9 @@ BRANDING_NAME = "FixTweet / FixupX" STANDARD_DOMAIN_LIST = "fxtwitter.com,fixupx.com,twittpr.com" -DIRECT_MEDIA_DOMAINS = "d.fxtwitter.com,dl.fxtwitter.com,d.pxtwitter.com,d.twittpr.com,dl.pxtwitter.com,dl.twittpr.com,d.fixupx.com,d.xfixup.com,dl.fixupx.com,dl.xfixup.com" +DIRECT_MEDIA_DOMAINS = "d.fxtwitter.com,dl.fxtwitter.com,d.twittpr.com,dl.twittpr.com,d.fixupx.com,d.xfixup.com,dl.fixupx.com,dl.xfixup.com" TEXT_ONLY_DOMAINS = "t.fxtwitter.com,t.twittpr.com,t.fixupx.com" INSTANT_VIEW_DOMAINS = "i.fxtwitter.com,i.twittpr.com,i.fixupx.com" GALLERY_DOMAINS = "g.fxtwitter.com,g.twittpr.com,g.fixupx.com" -DEPRECATED_DOMAIN_LIST = "pxtwitter.com,www.pxtwitter.com" MOSAIC_DOMAIN_LIST = "mosaic.fxtwitter.com" API_HOST_LIST = "api.fxtwitter.com,api-canary.fxtwitter.com" HOST_URL = "https://fxtwitter.com" diff --git a/esbuild.config.mjs b/esbuild.config.mjs index 65aa8a8..e67ab9a 100644 --- a/esbuild.config.mjs +++ b/esbuild.config.mjs @@ -43,8 +43,7 @@ let envVariables = [ 'EMBED_URL', 'MOSAIC_DOMAIN_LIST', 'API_HOST_LIST', - 'SENTRY_DSN', - 'DEPRECATED_DOMAIN_LIST' + 'SENTRY_DSN' ]; // Create defines for all environment variables diff --git a/jestconfig.json b/jestconfig.json index 37e6521..b1af672 100644 --- a/jestconfig.json +++ b/jestconfig.json @@ -11,7 +11,6 @@ "STANDARD_DOMAIN_LIST": "fxtwitter.com,fixupx.com,twittpr.com", "DIRECT_MEDIA_DOMAINS": "d.fxtwitter.com,dl.fxtwitter.com,d.fixupx.com,dl.fixupx.com", "MOSAIC_DOMAIN_LIST": "mosaic.fxtwitter.com", - "DEPRECATED_DOMAIN_LIST": "pxtwitter.com,www.pxtwitter.com", "API_HOST_LIST": "api.fxtwitter.com", "HOST_URL": "https://fxtwitter.com", "REDIRECT_URL": "https://github.com/FixTweet/FixTweet", diff --git a/src/constants.ts b/src/constants.ts index 99cf212..2f0e048 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -6,7 +6,6 @@ export const Constants = { TEXT_ONLY_DOMAINS: TEXT_ONLY_DOMAINS.split(','), INSTANT_VIEW_DOMAINS: INSTANT_VIEW_DOMAINS.split(','), GALLERY_DOMAINS: GALLERY_DOMAINS.split(','), - DEPRECATED_DOMAIN_LIST: DEPRECATED_DOMAIN_LIST.split(','), MOSAIC_DOMAIN_LIST: MOSAIC_DOMAIN_LIST.split(','), API_HOST_LIST: API_HOST_LIST.split(','), HOST_URL: HOST_URL, diff --git a/src/embed/status.ts b/src/embed/status.ts index b453d8d..8cce388 100644 --- a/src/embed/status.ts +++ b/src/embed/status.ts @@ -384,10 +384,6 @@ export const handleStatus = async ( } } - /* Notice that user is using deprecated domain */ - if (flags?.deprecated) { - siteName = Strings.DEPRECATED_DOMAIN_NOTICE; - } /* For supporting Telegram IV, we have to replace newlines with
within the og:description tag because of its weird (undocumented?) behavior. If you don't use IV, it uses newlines just fine. Just like Discord and others. But with IV, suddenly newlines don't actually break the line anymore. @@ -438,13 +434,12 @@ export const handleStatus = async ( let providerEngagementText = getSocialProof(status) ?? Strings.DEFAULT_AUTHOR_TEXT; providerEngagementText = providerEngagementText.replace(/ {4}/g, ' '); headers.push( - ``.format( + ``.format( { base: Constants.HOST_URL, text: flags.gallery ? status.author.name : encodeURIComponent(truncateWithEllipsis(authorText, 255)), - deprecatedFlag: flags?.deprecated ? '&deprecated=true' : '', status: encodeURIComponent(statusId), author: encodeURIComponent(status.author.screen_name || ''), name: status.author.name || '', diff --git a/src/realms/twitter/routes/status.ts b/src/realms/twitter/routes/status.ts index 06b5e9a..dbbffbe 100644 --- a/src/realms/twitter/routes/status.ts +++ b/src/realms/twitter/routes/status.ts @@ -63,15 +63,6 @@ export const statusRequest = async (c: Context) => { flags.direct = true; } - /* The pxtwitter.com domain is deprecated and statuses posted after deprecation - date will have a notice saying we've moved to fxtwitter.com! */ - if ( - Constants.DEPRECATED_DOMAIN_LIST.includes(url.hostname) - ) { - console.log('Request to deprecated domain'); - flags.deprecated = true; - } - /* TODO: Figure out what we're doing with FixTweet / FixupX branding in future */ if (/fixup/g.test(url.href)) { console.log(`We're using x domain`); diff --git a/src/strings.ts b/src/strings.ts index 36b95f5..332dc1b 100644 --- a/src/strings.ts +++ b/src/strings.ts @@ -218,9 +218,6 @@ This may be caused by API downtime or a new bug. Try again in a little while." p ERROR_USER_NOT_FOUND: `Sorry, that user doesn't exist :(`, ERROR_UNKNOWN: `Unknown error occurred, sorry about that :(`, - DEPRECATED_DOMAIN_NOTICE: `We've moved! ➡ fxtwitter.com`, - DEPRECATED_DOMAIN_NOTICE_DISCORD: `We've moved! ➡ fxtwitter.com`, - ROBOTS_TXT: `# /-------------------------------------------\\ # | _______ | # | | | | diff --git a/src/types/env.d.ts b/src/types/env.d.ts index 2b04cf2..a30fa1f 100644 --- a/src/types/env.d.ts +++ b/src/types/env.d.ts @@ -4,7 +4,6 @@ declare const DIRECT_MEDIA_DOMAINS: string; declare const TEXT_ONLY_DOMAINS: string; declare const INSTANT_VIEW_DOMAINS: string; declare const GALLERY_DOMAINS: string; -declare const DEPRECATED_DOMAIN_LIST: string; declare const HOST_URL: string; declare const EMBED_URL: string; declare const REDIRECT_URL: string; diff --git a/src/types/types.d.ts b/src/types/types.d.ts index 6e2ad82..6b1e26d 100644 --- a/src/types/types.d.ts +++ b/src/types/types.d.ts @@ -5,7 +5,6 @@ type InputFlags = { standard?: boolean; direct?: boolean; api?: boolean; - deprecated?: boolean; textOnly?: boolean; isXDomain?: boolean; forceInstantView?: boolean; diff --git a/src/worker.ts b/src/worker.ts index b376088..9bd994a 100644 --- a/src/worker.ts +++ b/src/worker.ts @@ -44,7 +44,7 @@ export const app = new Hono<{ } else { console.log(`Domain not assigned to realm, falling back to Twitter: ${url.hostname}`); } - /* Defaults to Twitter realm if unknown domain specified (such as the *.workers.dev hostname or deprecated domain) */ + /* Defaults to Twitter realm if unknown domain specified (such as the *.workers.dev hostname) */ console.log(`/${realm}${url.pathname}`); return `/${realm}${url.pathname}`;