openclaw-matrix-multiaccounts/src
Tyler Yust 57248a7ca1
fix: prefer requesterOrigin over stale session entry in subagent announce routing (#4957)
* fix: prefer requesterOrigin over stale session entry in subagent announce routing

When a subagent finishes and announces results back, resolveAnnounceOrigin
merged the session entry (primary) with requesterOrigin (fallback). If the
session store had a stale lastChannel (e.g. whatsapp) from a previous
interaction but the user was now on a different channel (e.g. bluebubbles),
the announce would route to the wrong channel.

Swap the merge order so requesterOrigin (captured at spawn time, reflecting
the actual current channel) takes priority, with the session entry as
fallback for any missing fields.

Error before fix:
  Delivery failed (whatsapp to bluebubbles:chat_guid:...): Unknown channel: whatsapp

Adds regression test for the stale-channel scenario.

* fix: match test to exact failure scenario and improve reliability (#4957) (thanks @tyler6204)

- Remove lastTo from stale session store to match the exact mismatch scenario described in the PR
- Replace 5ms setTimeout sleeps with expect.poll for better test reliability
- Prevents flakiness on slower CI machines
2026-01-30 15:52:19 -08:00
..
acp refactor: rename to openclaw 2026-01-30 03:16:21 +01:00
agents fix: prefer requesterOrigin over stale session entry in subagent announce routing (#4957) 2026-01-30 15:52:19 -08:00
auto-reply refactor: rename to openclaw 2026-01-30 03:16:21 +01:00
browser refactor: rename to openclaw 2026-01-30 03:16:21 +01:00
canvas-host refactor: rename to openclaw 2026-01-30 03:16:21 +01:00
channels fix: accept numeric Telegram react ids (#4533) (thanks @Ayush10) 2026-01-30 15:01:18 +05:30
cli fix: local updates for PR #4780 2026-01-30 15:47:05 -05:00
commands fix: prevent undefined gateway token defaults (#4873) (thanks @Hisleren) 2026-01-30 16:16:35 -05:00
compat refactor: rename to openclaw 2026-01-30 03:16:21 +01:00
config feat: add Kimi K2.5 model to synthetic catalog (#4407) 2026-01-30 07:17:42 +01:00
cron refactor: rename to openclaw 2026-01-30 03:16:21 +01:00
daemon fix: detect legacy gateway launchd labels 2026-01-30 05:01:46 +01:00
discord refactor: rename to openclaw 2026-01-30 03:16:21 +01:00
docs bugfix:The Mintlify navbar (logo + search bar with ⌘K) scrolls away w… (#2445) 2026-01-26 17:39:10 -08:00
gateway Tests: use agents_list in tools invoke gateway test 2026-01-30 18:17:12 +01:00
hooks refactor: rename to openclaw 2026-01-30 03:16:21 +01:00
imessage refactor: rename to openclaw 2026-01-30 03:16:21 +01:00
infra fix: resolve Control UI assets for global installs (#4909) (thanks @YuriNachos) 2026-01-30 17:08:40 -05:00
line refactor: rename to openclaw 2026-01-30 03:16:21 +01:00
link-understanding refactor: rename to openclaw 2026-01-30 03:16:21 +01:00
logging refactor: rename to openclaw 2026-01-30 03:16:21 +01:00
macos refactor: rename to openclaw 2026-01-30 03:16:21 +01:00
markdown fix: correct telegram html nesting (#4578) (thanks @ThanhNguyxn) 2026-01-30 16:53:39 +05:30
media refactor: rename to openclaw 2026-01-30 03:16:21 +01:00
media-understanding refactor: rename to openclaw 2026-01-30 03:16:21 +01:00
memory refactor: rename to openclaw 2026-01-30 03:16:21 +01:00
node-host refactor: rename to openclaw 2026-01-30 03:16:21 +01:00
pairing refactor: rename to openclaw 2026-01-30 03:16:21 +01:00
plugin-sdk refactor: rename to openclaw 2026-01-30 03:16:21 +01:00
plugins fix: update config types 2026-01-30 03:20:28 +01:00
process refactor: rename to openclaw 2026-01-30 03:16:21 +01:00
providers refactor: rename to openclaw 2026-01-30 03:16:21 +01:00
routing refactor: rename to openclaw 2026-01-30 03:16:21 +01:00
scripts refactor: rename to openclaw 2026-01-30 03:16:21 +01:00
security refactor: rename to openclaw 2026-01-30 03:16:21 +01:00
sessions refactor: rename to openclaw 2026-01-30 03:16:21 +01:00
shared/text fix: preserve reasoning tags inside code blocks (#4118) (thanks @vinaygit18) 2026-01-29 18:53:05 +00:00
signal refactor: rename to openclaw 2026-01-30 03:16:21 +01:00
slack refactor: rename to openclaw 2026-01-30 03:16:21 +01:00
telegram fix: correct telegram html nesting (#4578) (thanks @ThanhNguyxn) 2026-01-30 16:53:39 +05:30
terminal refactor: rename to openclaw 2026-01-30 03:16:21 +01:00
test-helpers refactor: rename to openclaw 2026-01-30 03:16:21 +01:00
test-utils feat: Add Line plugin (#1630) 2026-01-25 12:22:36 +00:00
tts refactor: rename to openclaw 2026-01-30 03:16:21 +01:00
tui refactor: rename to openclaw 2026-01-30 03:16:21 +01:00
types TTS: gate auto audio on inbound voice notes (#1667) 2026-01-25 04:35:20 +00:00
utils refactor: rename to openclaw 2026-01-30 03:16:21 +01:00
web refactor: rename to openclaw 2026-01-30 03:16:21 +01:00
whatsapp refactor: prune legacy group prefixes 2026-01-17 08:47:25 +00:00
wizard fix: local updates for PR #4873 2026-01-30 16:16:35 -05:00
channel-web.barrel.test.ts refactor!: rename chat providers to channels 2026-01-13 08:40:39 +00:00
channel-web.ts refactor!: rename chat providers to channels 2026-01-13 08:40:39 +00:00
docker-setup.test.ts refactor: rename to openclaw 2026-01-30 03:16:21 +01:00
entry.ts refactor: rename to openclaw 2026-01-30 03:16:21 +01:00
git-hooks.test.ts refactor: rename to openclaw 2026-01-30 03:16:21 +01:00
globals.test.ts chore: format to 2-space and bump changelog 2025-11-26 00:53:53 +01:00
globals.ts CLI: streamline startup paths and env parsing 2026-01-18 23:10:39 +00:00
index.test.ts chore: migrate to oxlint and oxfmt 2026-01-14 15:02:19 +00:00
index.ts refactor: rename to openclaw 2026-01-30 03:16:21 +01:00
logger.test.ts refactor: rename to openclaw 2026-01-30 03:16:21 +01:00
logger.ts refactor(logging): split config + subsystem imports 2026-01-19 00:15:44 +00:00
logging.ts fix: unblock bundled plugin load 2026-01-18 19:34:21 +00:00
polls.test.ts chore: migrate to oxlint and oxfmt 2026-01-14 15:02:19 +00:00
polls.ts chore: migrate to oxlint and oxfmt 2026-01-14 15:02:19 +00:00
postinstall-patcher.test.ts refactor: rename to openclaw 2026-01-30 03:16:21 +01:00
runtime.ts perf: speed up memory batch polling 2026-01-18 03:55:14 +00:00
utils.test.ts refactor: rename to openclaw 2026-01-30 03:16:21 +01:00
utils.ts refactor: rename to openclaw 2026-01-30 03:16:21 +01:00
version.ts refactor: rename to openclaw 2026-01-30 03:16:21 +01:00