Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

address review: parseBoolean case-insensitive + 1/0 support, tighten getSessionMessages filter

[._.]/ Adam Eivy55e43e56f8f8
diff --git a/server/integrations/openclaw/api.js b/server/integrations/openclaw/api.js
index 3c0a129ba1..9316c429a7 100644
--- a/server/integrations/openclaw/api.js
+++ b/server/integrations/openclaw/api.js
@@ -13,8 +13,9 @@ const DEFAULT_PATHS = {
function parseBoolean(value) {
if (typeof value === 'boolean') return value;
if (typeof value !== 'string') return undefined;
- if (value === 'true') return true;
- if (value === 'false') return false;
+ const normalized = value.trim().toLowerCase();
+ if (normalized === 'true' || normalized === '1') return true;
+ if (normalized === 'false' || normalized === '0') return false;
return undefined;
}
@@ -411,7 +412,7 @@ export async function getSessionMessages(sessionId, { limit = 50 } = {}) {
}, sessionId);
const messages = (payload?.messages || [])
.map((message, index) => normalizeMessage(message, index))
- .filter(message => message.content || message.role || message.createdAt);
+ .filter(message => message.content || message.createdAt);
return {
configured: true,