Commit Graph

33 Commits

Author SHA1 Message Date
Marcus Neves
13752bb361 feat(whatsapp,telegram): add groupPolicy config option (#216)
Co-authored-by: Marcus Neves <conhecendo.contato@gmail.com>
Co-authored-by: Shadow <hi@shadowing.dev>
2026-01-05 22:41:19 -06:00
Peter Steinberger
fc24d5f61b test: cover WhatsApp DM senderE164 2026-01-06 00:55:41 +01:00
Peter Steinberger
9d3ae19b9e feat: standardize timestamps to UTC 2026-01-05 23:03:59 +00:00
Peter Steinberger
935e2ec24c fix: stage sandbox media for inbound attachments 2026-01-05 06:18:11 +01:00
Jake
4b1d10c97e WhatsApp: mark offline/history messages as read 2026-01-05 01:36:29 +01:00
Peter Steinberger
f7cb3846f1 chore: rename project to clawdbot 2026-01-04 14:38:51 +00:00
Peter Steinberger
660eeb5ea1 fix: add gif playback for WhatsApp sends 2026-01-03 23:56:40 +00:00
Peter Steinberger
e98d9a8a98 refactor: move whatsapp allowFrom config 2026-01-02 13:00:29 +01:00
Peter Steinberger
12928f8002 fix: extract quoted WhatsApp reply text 2025-12-26 10:51:08 +01:00
Peter Steinberger
1b87dbc0be style: format reply changes 2025-12-24 23:06:20 +01:00
Peter Steinberger
7daf09ef90 fix: avoid threaded replies for agent output 2025-12-24 22:36:42 +01:00
Peter Steinberger
d980ce77f2 refactor: move inbound config 2025-12-24 00:22:52 +00:00
Peter Steinberger
651843c5e6 test: update whatsapp reply quote assertions 2025-12-23 02:30:21 +01:00
Peter Steinberger
317d4ddbac fix: add whatsapp reply context 2025-12-23 02:30:21 +01:00
Peter Steinberger
8a1d922592 fix(web): handle self-chat mode 2025-12-20 19:32:06 +01:00
Peter Steinberger
e3aeeafad5 fix: make web inbox non-blocking 2025-12-20 18:24:05 +01:00
Peter Steinberger
2d51f515be style(tests): format imports 2025-12-12 16:47:10 +00:00
Peter Steinberger
9b72b8b86c web: default to self-only without config 2025-12-12 01:22:03 +00:00
Peter Steinberger
1b888af439 Launch agent: disable autostart without killing running app 2025-12-07 19:01:14 +01:00
Peter Steinberger
b662fcc9d2 chore: purge warelay references 2025-12-07 03:36:57 +00:00
Peter Steinberger
b83035d13c fix(web): unwrap ephemeral/view-once and keep mentions 2025-12-03 13:15:46 +00:00
Peter Steinberger
922d15c6f3 test(web): ensure group messages carry sender + bypass allowFrom 2025-12-03 13:12:05 +00:00
Peter Steinberger
481c5ea192 fix(web): let group pings bypass allowFrom 2025-12-03 13:11:01 +00:00
Peter Steinberger
cee6618fd6 feat(web): add group chat mention support 2025-12-03 12:35:18 +00:00
Peter Steinberger
84d9501e85 Tests: cover agents and fix web defaults
Co-authored-by: RealSid08 <RealSid08@users.noreply.github.com>
2025-12-02 11:08:00 +00:00
Peter Steinberger
7ea879ac46 Fix test corrupting production sessions.json
The test 'falls back to most recent session when no to is provided' was
using resolveStorePath() which returns the real ~/.warelay/sessions.json.
This overwrote production session data with test values, causing session
fragmentation issues.

Changed to use a temp directory like other tests.
2025-12-02 05:54:31 +00:00
Peter Steinberger
9f1c2169eb Fix test isolation to prevent loading real user config
Tests were picking up real ~/.warelay/warelay.json with emojis and
prefixes (like "🦞"), causing test assertions to fail. Added proper
config mocks to all test files.

Changes:
- Mock loadConfig() in index.core.test.ts, inbound.media.test.ts,
  monitor-inbox.test.ts
- Update test-helpers.ts default mock to disable all prefixes
- Tests now use clean config: no messagePrefix, no responsePrefix,
  no timestamp, allowFrom=["*"]

This ensures tests validate core behavior without user-specific config.
The responsePrefix feature itself is already fully config-driven - this
only fixes test isolation.
2025-11-30 18:00:57 +00:00
Peter Steinberger
a7926fc49f Add auto-recovery from stuck WhatsApp sessions
Fixes issue where unauthorized messages from +212652169245 (5elements spa)
triggered Bad MAC errors and silently killed the event emitter, preventing
all future message processing.

Changes:
1. Early allowFrom filtering in inbound.ts - blocks unauthorized senders
   before they trigger encryption errors
2. Message timeout watchdog - auto-restarts connection if no messages
   received for 10 minutes
3. Health monitoring in heartbeat - warns if >30 min without messages
4. Mock loadConfig in tests to handle new dependency

Root cause: Event emitter stopped firing after Bad MAC errors from
decryption attempts on messages from unauthorized senders. Connection
stayed alive but all subsequent messages.upsert events silently failed.
2025-11-30 17:53:32 +00:00
Peter Steinberger
00cd24e7e5 web: add heartbeat and bounded reconnect tuning 2025-11-26 02:34:43 +01:00
Peter Steinberger
8c417ff887 chore: commit pending cli/web test tweaks 2025-11-26 02:19:45 +01:00
Peter Steinberger
da46c8e95f feat(web): add logout command and tests 2025-11-26 01:29:02 +01:00
Peter Steinberger
2cb244ec35 chore(tests): organize web test imports 2025-11-26 01:24:34 +01:00
Peter Steinberger
786a6d4952 test(web): split provider web suite 2025-11-26 01:23:34 +01:00