openclaw/docs/channels
Monty Taylor caf5d2dd7c feat(matrix): Add multi-account support to Matrix channel
The Matrix channel previously hardcoded `listMatrixAccountIds` to always
return only `DEFAULT_ACCOUNT_ID`, ignoring any accounts configured in
`channels.matrix.accounts`. This prevented running multiple Matrix bot
accounts simultaneously.

Changes:
- Update `listMatrixAccountIds` to read from `channels.matrix.accounts`
  config, falling back to `DEFAULT_ACCOUNT_ID` for legacy single-account
  configurations
- Add `resolveMatrixConfigForAccount` to resolve config for a specific
  account ID, merging account-specific values with top-level defaults
- Update `resolveMatrixAccount` to use account-specific config when
  available
- The multi-account config structure (channels.matrix.accounts) was not
  defined in the MatrixConfig type, causing TypeScript to not recognize
  the field. Added the accounts field to properly type the multi-account
  configuration.
- Add stopSharedClientForAccount() to stop only the specific account's
  client instead of all clients when an account shuts down
- Wrap dynamic import in try/finally to prevent startup mutex deadlock
  if the import fails
- Pass accountId to resolveSharedMatrixClient(), resolveMatrixAuth(),
  and createMatrixClient() to ensure the correct account's credentials
  are used for outbound messages
- Add accountId parameter to resolveMediaMaxBytes to check account-specific
  config before falling back to top-level config
- Maintain backward compatibility with existing single-account setups

This follows the same pattern already used by the WhatsApp channel for
multi-account support.

Fixes #3165
Fixes #3085

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-13 20:39:58 +01:00
..
bluebubbles.md docs: canonicalize docs paths and align zh navigation (#11428) 2026-02-07 15:40:35 -05:00
broadcast-groups.md docs: canonicalize docs paths and align zh navigation (#11428) 2026-02-07 15:40:35 -05:00
channel-routing.md docs: canonicalize docs paths and align zh navigation (#11428) 2026-02-07 15:40:35 -05:00
discord.md Docs: add discord presence config notes (#10855) 2026-02-13 13:34:19 -06:00
feishu.md refactor: unify peer kind to ChatType, rename dm to direct (#11881) 2026-02-09 09:20:52 +09:00
googlechat.md Docs: enable markdownlint autofixables except list numbering (#10476) 2026-02-06 10:08:59 -05:00
grammy.md fix(security): default standalone servers to loopback bind (#13184) 2026-02-13 16:39:56 +01:00
group-messages.md docs: canonicalize docs paths and align zh navigation (#11428) 2026-02-07 15:40:35 -05:00
groups.md docs: canonicalize docs paths and align zh navigation (#11428) 2026-02-07 15:40:35 -05:00
imessage.md docs(channels): modernize imessage docs page (#14213) 2026-02-11 12:58:02 -05:00
index.md feat: IRC — add first-class channel support 2026-02-10 17:33:57 -06:00
irc.md feat: IRC — add first-class channel support 2026-02-10 17:33:57 -06:00
line.md Docs: enable markdownlint autofixables except list numbering (#10476) 2026-02-06 10:08:59 -05:00
location.md Docs: add nav titles across docs (#5689) 2026-01-31 15:04:03 -06:00
matrix.md feat(matrix): Add multi-account support to Matrix channel 2026-02-13 20:39:58 +01:00
mattermost.md docs: canonicalize docs paths and align zh navigation (#11428) 2026-02-07 15:40:35 -05:00
msteams.md Docs: add User.Read.All permission info for MS Teams user mentions 2026-02-13 15:10:57 +01:00
nextcloud-talk.md docs: canonicalize docs paths and align zh navigation (#11428) 2026-02-07 15:40:35 -05:00
nostr.md revert(docs): undo markdownlint autofix churn 2026-02-06 10:00:08 -05:00
pairing.md fix: enforce feishu dm policy + pairing flow (#14876) (thanks @coygeek) 2026-02-13 05:48:22 +01:00
signal.md docs(signal): improve setup, verification, and troubleshooting guidance 2026-02-13 20:38:56 +01:00
slack.md fix(slack): populate thread session with existing thread history (#7610) 2026-02-13 05:51:04 +01:00
telegram.md fix(security): default standalone servers to loopback bind (#13184) 2026-02-13 16:39:56 +01:00
tlon.md docs: canonicalize docs paths and align zh navigation (#11428) 2026-02-07 15:40:35 -05:00
troubleshooting.md docs: add symptom-first troubleshooting hub and deep runbooks (#11196) 2026-02-07 10:28:19 -05:00
twitch.md docs: canonicalize docs paths and align zh navigation (#11428) 2026-02-07 15:40:35 -05:00
whatsapp.md docs(channels): modernize whatsapp docs page (#14202) 2026-02-11 12:31:56 -05:00
zalo.md docs: canonicalize docs paths and align zh navigation (#11428) 2026-02-07 15:40:35 -05:00
zalouser.md docs: canonicalize docs paths and align zh navigation (#11428) 2026-02-07 15:40:35 -05:00