#22075: mattermost: honor account requireMention override
channel: mattermost
size: S
Cluster:
Mattermost Mention Overrides Fixes
## Summary
Describe the problem and fix in 2–5 bullets:
- Problem:
- Why it matters:
- What changed:
- What did NOT change (scope boundary):
## Change Type (select all)
- [ ] Bug fix
- [ ] Feature
- [ ] Refactor
- [ ] Docs
- [ ] Security hardening
- [ ] Chore/infra
## Scope (select all touched areas)
- [ ] Gateway / orchestration
- [ ] Skills / tool execution
- [ ] Auth / tokens
- [ ] Memory / storage
- [ ] Integrations
- [ ] API / contracts
- [ ] UI / DX
- [ ] CI/CD / infra
## Linked Issue/PR
- Closes #
- Related #
## User-visible / Behavior Changes
List user-visible changes (including defaults/config).
If none, write `None`.
## Security Impact (required)
- New permissions/capabilities? (`Yes/No`)
- Secrets/tokens handling changed? (`Yes/No`)
- New/changed network calls? (`Yes/No`)
- Command/tool execution surface changed? (`Yes/No`)
- Data access scope changed? (`Yes/No`)
- If any `Yes`, explain risk + mitigation:
## Repro + Verification
### Environment
- OS:
- Runtime/container:
- Model/provider:
- Integration/channel (if any):
- Relevant config (redacted):
### Steps
1.
2.
3.
### Expected
-
### Actual
-
## Evidence
Attach at least one:
- [ ] Failing test/log before + passing after
- [ ] Trace/log snippets
- [ ] Screenshot/recording
- [ ] Perf numbers (if relevant)
## Human Verification (required)
What you personally verified (not just CI), and how:
- Verified scenarios:
- Edge cases checked:
- What you did **not** verify:
## Compatibility / Migration
- Backward compatible? (`Yes/No`)
- Config/env changes? (`Yes/No`)
- Migration needed? (`Yes/No`)
- If yes, exact upgrade steps:
## Failure Recovery (if this breaks)
- How to disable/revert this change quickly:
- Files/config to restore:
- Known bad symptoms reviewers should watch for:
## Risks and Mitigations
List only real risks for this PR. Add/remove entries as needed. If none, write `None`.
- Risk:
- Mitigation:
<!-- greptile_comment -->
<h3>Greptile Summary</h3>
Added account-level `requireMention` override support to Mattermost channel handler. Previously, mention requirements were only resolved through the group-level resolver; now account configuration (`account.requireMention`) takes precedence when explicitly set.
- Extracted mention policy logic into new `resolveMattermostRequireMentionPolicy` helper
- Direct messages always disable mention requirement
- Account-level `requireMention` override is honored when set (derived from `chatmode` or explicit config)
- Falls back to group-level resolver when account override is undefined
- Added comprehensive test coverage for all three policy paths
<h3>Confidence Score: 5/5</h3>
- This PR is safe to merge with minimal risk
- The change is well-contained, properly tested, follows existing patterns in the codebase (similar to how `resolveMattermostRequireMention` works in `accounts.ts`), and has clear logical precedence. The refactoring extracts logic into a testable helper without changing behavior for existing configurations.
- No files require special attention
<sub>Last reviewed commit: a0218cc</sub>
<!-- greptile_other_comments_section -->
<sub>(2/5) Greptile learns from your feedback when you react with thumbs up/down!</sub>
<!-- /greptile_comment -->
Most Similar PRs
#10081: fix(mattermost): pass requireMentionOverride to core resolver
by manchmod · 2026-02-06
88.3%
#10587: fix(extensions/mattermost): pass requireMention override from chatm...
by baku4 · 2026-02-06
86.9%
#20051: fix(mattermost): fix chatmode: "onmessage" to work correctly in mat...
by RHesketh · 2026-02-18
81.1%
#12468: feat(mattermost): add read, search, and channel-list actions
by adamsbytes · 2026-02-09
80.5%
#16570: feat(mattermost): add replyToMode threading support
by FBartos · 2026-02-14
79.1%
#21108: slack: keep requireMention thread follow-ups when thread session is...
by JayElRay · 2026-02-19
77.1%
#20928: mattermost: add readMessages action for channel history
by hubertusgbecker · 2026-02-19
75.7%
#23689: feat(discord): add ignoreOtherMentions config option
by Q00 · 2026-02-22
74.3%
#7719: fix(slack): thread replies with @mentions dropped in requireMention...
by SocialNerd42069 · 2026-02-03
74.3%
#19274: feat(mattermost): enable threaded replies in channels
by rockinyp · 2026-02-17
74.3%