From f9d227c081e0b13cbe1fdcd41f79789460150b71 Mon Sep 17 00:00:00 2001 From: Hugo Caumo Date: Mon, 23 Dec 2024 07:04:01 +0000 Subject: [PATCH] Standardize boolean values and update .env file pattern Replace YES/NO with true/false for boolean variables in .env file. Ensure consistency across the codebase by removing the need for parseBooleanFromText. --- packages/client-twitter/src/post.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/client-twitter/src/post.ts b/packages/client-twitter/src/post.ts index 65fe46956a5..074e61f5746 100644 --- a/packages/client-twitter/src/post.ts +++ b/packages/client-twitter/src/post.ts @@ -161,11 +161,11 @@ export class TwitterPostClient { if ( this.runtime.getSetting("POST_IMMEDIATELY") != null && - this.runtime.getSetting("POST_IMMEDIATELY") != "" + this.runtime.getSetting("POST_IMMEDIATELY") !== "" ) { - postImmediately = parseBooleanFromText( - this.runtime.getSetting("POST_IMMEDIATELY") - ); + // Retrieve setting, default to false if not set or if the value is not "true" + postImmediately = this.runtime.getSetting("POST_IMMEDIATELY") === "true" || false; + } if (postImmediately) {