diff --git a/packages/client-twitter/src/post.ts b/packages/client-twitter/src/post.ts index 47eb41b17aa..13ab4ecf79e 100644 --- a/packages/client-twitter/src/post.ts +++ b/packages/client-twitter/src/post.ts @@ -627,11 +627,12 @@ export class TwitterPostClient { const homeTimeline = await this.client.fetchTimelineForActions(); const results = []; - let maxActionsProcessing = + let count = 0; + const maxActionsProcessing = this.client.twitterConfig.MAX_ACTIONS_PROCESSING; for (const tweet of homeTimeline) { - if (maxActionsProcessing >= 2) { + if (count >= maxActionsProcessing) { break; } try { @@ -925,7 +926,7 @@ export class TwitterPostClient { parsedActions: actionResponse, executedActions, }); - maxActionsProcessing++; + count++; } catch (error) { elizaLogger.error( `Error processing tweet ${tweet.id}:`,