openclaw/extensions/mattermost
wangmiao0668000666 80bab7e23c
fix(mattermost): route threaded channel reactions to the thread session (#155812)
Fixes #156008
Related: #127605 (Mattermost slice)

## What Problem This Solves

A reaction on a Mattermost channel-thread message reaches the parent channel session instead of the thread containing that message.

## User Impact

Thread reactions now reach the same session as their messages. Top-level reactions remain in the parent session with default threading off. Configured threading follows existing message routing; failed post lookups retain the parent-session fallback. No configuration, public API, or stored-data changes are required.

## Why This Change Was Made

Reaction payloads contain a post ID but no thread root. Resolve the post through the existing bounded resource-cache pattern, then let the existing event plan choose the session using the same post identity as the message path.

## Evidence

- Exercised the real REST client, monitor resource cache, reaction handler, and thread resolver against a loopback Mattermost HTTP stub. The runtime event sink records the selected session.
- With pre-fix production sources, the thread assertion fails: the observed key is `mattermost:default:channel:chan-1`. With this head, it is `mattermost:default:channel:chan-1:thread:root-1` and the server observes the post lookup.
- Top-level/default-off and unresolved-post controls retain the parent session on both sides.
- Candidate regression and resource suites: 31 tests passed. The supplemental loopback proof adds three passing scenarios.
- Simplification retained the existing routing owner and bounded metadata-cache pattern; no competing policy or public seam. Production delta: +41/-2; retained test delta: +196/-0.
- Exact-head hosted CI run 35762478168 is green; hosted ClawSweeper is ready for `2f2942660abd633dcd4775d03b7dff7d4c547f43`.
- No live Mattermost tenant or WebSocket transport was exercised. Documentation already describes routed reaction events and existing thread settings; no documentation or release-owned changelog change was needed.

Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-09-23 11:12:23 +05:30
..
assets feat: give every plugin a compact chat activity icon (#147333) 2026-09-13 13:49:51 -07:00
src fix(mattermost): route threaded channel reactions to the thread session (#155812) 2026-09-23 11:12:23 +05:30
api.test.ts
api.ts
channel-plugin-api.ts
channel-plugin-runtime.ts
config-doctor-api.ts
doctor-contract-api.ts
gateway-auth-api.ts
index.ts
openclaw.plugin.json feat(plugins): define package-owned categories (#142710) 2026-09-09 19:05:40 -07:00
package.json chore(deps): refresh dependencies with seven-day cutoff (#154652) 2026-09-21 16:55:54 -07:00
policy-api.ts
README.md
runtime-api.ts
secret-contract-api.ts
setup-entry.ts
slash-route-api.ts
tsconfig.json

Mattermost OpenClaw channel

Official OpenClaw channel plugin for Mattermost.

Install

openclaw plugins install @openclaw/mattermost

Docs

See docs/channels/mattermost.md in the OpenClaw repository, or the published docs at https://docs.openclaw.ai/channels/mattermost.