From ec24895ece5e102e0aa052f52f214658a19f14a6 Mon Sep 17 00:00:00 2001 From: dangered wolf Date: Thu, 2 Nov 2023 05:54:10 -0400 Subject: [PATCH] Workaround for GraphQLTweet detector --- src/helpers/graphql.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/helpers/graphql.ts b/src/helpers/graphql.ts index 0f19409..e11097e 100644 --- a/src/helpers/graphql.ts +++ b/src/helpers/graphql.ts @@ -16,7 +16,7 @@ export const isGraphQLTweet = (response: unknown): response is GraphQLTweet => { return ( typeof response === 'object' && response !== null && - '__typename' in response && - (response.__typename === 'Tweet' || response.__typename === 'TweetWithVisibilityResults') + // @ts-expect-error it's 6 am please let me sleep + ('__typename' in response && (response.__typename === 'Tweet' || response.__typename === 'TweetWithVisibilityResults') || ('legacy' in response && response.legacy?.full_text)) ); };