From b4a76f2b4ee8c30c8aaf997ed248e146adffa7a6 Mon Sep 17 00:00:00 2001 From: Rishikant181 Date: Thu, 17 Oct 2024 23:54:34 +0530 Subject: [PATCH 1/2] Fixed maximum call stack exceeded error while deserializing tweets with quoted --- src/models/data/Tweet.ts | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/src/models/data/Tweet.ts b/src/models/data/Tweet.ts index a145c9a8..8b0f100c 100644 --- a/src/models/data/Tweet.ts +++ b/src/models/data/Tweet.ts @@ -109,16 +109,10 @@ export class Tweet { } // If normal tweet else if (tweet.quoted_status_result && Object.entries(tweet.quoted_status_result).length) { - return new Tweet(tweet); + return new Tweet(tweet.quoted_status_result.result as ITweet); } // Else, skip else { - // Logging - LogService.log(ELogActions.WARNING, { - action: ELogActions.DESERIALIZE, - message: 'Quoted tweet not found, skipping', - }); - return undefined; } } @@ -137,12 +131,6 @@ export class Tweet { } // Else, skip else { - // Logging - LogService.log(ELogActions.WARNING, { - action: ELogActions.DESERIALIZE, - message: 'Retweeted tweet not found, skipping', - }); - return undefined; } } From 05dfcc0d5274b5c3b6d806cac160a710ba833dce Mon Sep 17 00:00:00 2001 From: Rishikant181 Date: Thu, 17 Oct 2024 23:55:24 +0530 Subject: [PATCH 2/2] Bumped version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 43dd44ec..f1a84c20 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rettiwt-api", - "version": "4.1.2", + "version": "4.1.3", "main": "dist/index.js", "types": "dist/index.d.ts", "description": "An API for fetching data from TwitterAPI, without any rate limits!",