Skip to content

Commit f9d227c

Browse files
Hugo CaumoHugo Caumo
Hugo Caumo
authored and
Hugo Caumo
committed
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.
1 parent 4c658d7 commit f9d227c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

packages/client-twitter/src/post.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -161,11 +161,11 @@ export class TwitterPostClient {
161161

162162
if (
163163
this.runtime.getSetting("POST_IMMEDIATELY") != null &&
164-
this.runtime.getSetting("POST_IMMEDIATELY") != ""
164+
this.runtime.getSetting("POST_IMMEDIATELY") !== ""
165165
) {
166-
postImmediately = parseBooleanFromText(
167-
this.runtime.getSetting("POST_IMMEDIATELY")
168-
);
166+
// Retrieve setting, default to false if not set or if the value is not "true"
167+
postImmediately = this.runtime.getSetting("POST_IMMEDIATELY") === "true" || false;
168+
169169
}
170170

171171
if (postImmediately) {

0 commit comments

Comments
 (0)