Skip to content

Commit ec49e6b

Browse files
authored
Merge pull request elizaOS#1392 from hcaumo/1391-standardize-boolean-values-in-env-file
Standardize boolean values and update .env file pattern
2 parents e383156 + f0c7ec2 commit ec49e6b

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)