@floomhq/signaldash 0.22.0 → 0.27.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/mcp.js CHANGED
@@ -127,7 +127,7 @@ function cleanMessage(message) {
127
127
  id: message.id ?? message.provider_id ?? null,
128
128
  text: message.text ?? null,
129
129
  timestamp: message.timestamp ?? null,
130
- is_sender: Boolean(message.is_sender),
130
+ is_sender: providerIsOwn(message.is_sender),
131
131
  sender_id: message.sender_id ?? null,
132
132
  attachments: (message.attachments || []).map((attachment) => ({
133
133
  id: attachment.id ?? null,
@@ -140,6 +140,16 @@ function cleanMessage(message) {
140
140
  };
141
141
  }
142
142
 
143
+ function providerIsOwn(value) {
144
+ if (typeof value === "boolean") return value;
145
+ if (typeof value === "number") return value !== 0;
146
+ if (typeof value === "string") {
147
+ const normalized = value.trim().toLowerCase();
148
+ return ["1", "true", "yes", "y"].includes(normalized);
149
+ }
150
+ return false;
151
+ }
152
+
143
153
  function itemList(payload) {
144
154
  return Array.isArray(payload?.items)
145
155
  ? payload.items
@@ -207,7 +217,7 @@ async function executeTool({ name, args, config, client, guard }) {
207
217
  const recent = itemList(await client.listMessages(chatId, 20));
208
218
  const duplicate = recent.find(
209
219
  (message) =>
210
- message.is_sender &&
220
+ providerIsOwn(message.is_sender) &&
211
221
  typeof message.text === "string" &&
212
222
  message.text.trim() === text,
213
223
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@floomhq/signaldash",
3
- "version": "0.22.0",
3
+ "version": "0.27.0",
4
4
  "description": "Secure LinkedIn, WhatsApp, and email access for AI agents",
5
5
  "type": "module",
6
6
  "bin": {
@@ -18,7 +18,7 @@
18
18
  },
19
19
  "scripts": {
20
20
  "test": "node --test",
21
- "check": "node --check bin/sd.mjs && node --check server/server.cjs && node --check server/write-control.cjs && node --check bin/signaldash.js && node --check lib/cli.js && node --check lib/config-file.js && node --check lib/mcp.js && node --check lib/rate-guard.js && node --check lib/secrets.js && node --check lib/unipile.js"
21
+ "check": "node --check bin/sd.mjs && node --check server/server.cjs && node --check server/attachments.cjs && node --check server/write-control.cjs && node --check server/voice-profile.cjs && node --check server/campaign-store.cjs && node --check server/campaign-runner.cjs && node --check server/withdrawal-store.cjs && node --check server/post-scheduler.cjs && node --check bin/signaldash.js && node --check lib/cli.js && node --check lib/config-file.js && node --check lib/mcp.js && node --check lib/rate-guard.js && node --check lib/secrets.js && node --check lib/unipile.js"
22
22
  },
23
23
  "keywords": [
24
24
  "mcp",
@@ -34,4 +34,4 @@
34
34
  "ora": "8.0.1",
35
35
  "open": "10.1.0"
36
36
  }
37
- }
37
+ }