diff --git a/src/realms/twitter/routes/status.ts b/src/realms/twitter/routes/status.ts index 3fe51fa7..5b0d5289 100644 --- a/src/realms/twitter/routes/status.ts +++ b/src/realms/twitter/routes/status.ts @@ -134,6 +134,6 @@ export const statusRequest = async (c: Context) => { Obviously we just need to redirect to the status directly.*/ console.log('Matched human UA', userAgent); - return c.redirect(`${baseUrl}/${handle || 'i'}/status/${id?.match(/\d{2,20}/)?.[0]}?mx=1`, 302); + return c.redirect(`${baseUrl}/${handle || 'i'}/status/${id?.match(/\d{2,20}/)?.[0]}`, 302); } }; diff --git a/test/worker.test.ts b/test/worker.test.ts index eaa06d90..d647ca31 100644 --- a/test/worker.test.ts +++ b/test/worker.test.ts @@ -55,7 +55,7 @@ test('Status redirect human', async () => { }) ); expect(result.status).toEqual(302); - expect(result.headers.get('location')).toEqual('https://twitter.com/jack/status/20?mx=1'); + expect(result.headers.get('location')).toEqual('https://twitter.com/jack/status/20'); }); test('Status redirect human trailing slash', async () => { @@ -66,7 +66,7 @@ test('Status redirect human trailing slash', async () => { }) ); expect(result.status).toEqual(302); - expect(result.headers.get('location')).toEqual('https://twitter.com/jack/status/20?mx=1'); + expect(result.headers.get('location')).toEqual('https://twitter.com/jack/status/20'); }); test('Status redirect human custom base redirect', async () => { @@ -80,7 +80,7 @@ test('Status redirect human custom base redirect', async () => { }) ); expect(result.status).toEqual(302); - expect(result.headers.get('location')).toEqual('https://nitter.net/jack/status/20?mx=1'); + expect(result.headers.get('location')).toEqual('https://nitter.net/jack/status/20'); }); test('Twitter moment redirect', async () => { @@ -94,7 +94,7 @@ test('Twitter moment redirect', async () => { ) ); expect(result.status).toEqual(302); - expect(result.headers.get('location')).toEqual(`${twitterBaseUrl}/i/events/1572638642127966214?mx=1`); + expect(result.headers.get('location')).toEqual(`${twitterBaseUrl}/i/events/1572638642127966214`); }); test('Status response robot', async () => {