hermes-agent/website/docs/user-guide/messaging
Victor Kyriazakos accd672054 fix(slack): MPIMs (group DMs) obey shared-surface mention gating + reaction guard
Group DMs (MPIMs) were classified as DMs and thereby exempted from every
operator control that shared surfaces are supposed to honor: allowed_channels,
require_mention, strict_mention, free_response_channels, and the reaction
guard. Symptom: the bot added 👀/ to unmentioned MPIM
messages and still invoked the agent (which then returned NO_REPLY) instead of
the gateway dropping the event before model execution. Removing an MPIM from
allowed_channels did not disable it.

Root cause is the DM classification at adapter.py:
    is_dm = channel_type in {"im", "mpim"}
used for BOTH routing exemptions and reaction gating. An MPIM is a shared
surface (multiple humans can see and trigger the bot), not a private 1:1 DM,
so it must be gated like a channel.

This behavior was introduced/reinforced by a trail of Slack group-DM PRs:
- #4633  fix(slack): treat group DMs (mpim) like DMs + reaction guard
- #54632 fix(slack): subscribe to message.mpim + mpim scopes so group DMs work
- #54663 fix(slack): group DMs work OOTB + reinstall nudge
#54632/#54663 correctly made MPIM messages *reachable*; #4633 over-reached by
giving them the DM mention/reaction *exemptions*. This corrects only that
over-reach.

Fix (minimal): introduce `is_one_to_one_dm = channel_type == "im"` and key the
two EXEMPTION sites off it instead of `is_dm`:
- mention/allowlist gating block (`if not is_one_to_one_dm and bot_uid:`)
- reaction guard (`(is_one_to_one_dm or is_mentioned)`)
`is_dm` is intentionally retained for session/thread scoping and chat_type
labeling, where treating an MPIM as a persistent multi-party conversation is
correct — only the mention/reaction exemptions were wrong.

Docs: slack.md now distinguishes 1:1 DMs (mention-exempt) from group DMs
(shared surface; obey require_mention/strict_mention/allowed_channels/
free_response_channels; reactions only when @mentioned).

Tests: +7 in test_slack_mention.py (MPIM unmentioned dropped under
require_mention and strict_mention; MPIM mentioned processed; MPIM off
allowed_channels dropped; MPIM in free_response opted in; 1:1 IM still exempt;
reaction guard drops unmentioned MPIM). Updated _would_process to model the
is_one_to_one_dm gating + strict_mention. 72 passed.
2026-07-03 12:34:53 +05:30
..
_category_.json feat: add documentation website (Docusaurus) 2026-03-05 05:24:55 -08:00
bluebubbles.md feat(bluebubbles): support group mention gating 2026-06-01 18:52:05 -07:00
dingtalk.md docs: stop recommending pip install; curl installer is the only supported path (#51743) 2026-06-24 00:14:32 -07:00
discord.md docs: reconcile docs with code across last 3 releases (#54254) 2026-06-28 12:47:50 -07:00
email.md Make email pairing opt-in 2026-06-21 22:43:57 -07:00
feishu.md feat(gateway): handle Feishu meeting invitations 2026-06-04 06:15:23 -07:00
google_chat.md revert: keep Google Chat OAuth secret + active_provider profile-scoped (#39398) 2026-06-04 16:54:40 -07:00
homeassistant.md fix(docs): remove non-existent conversation_entity setting from homeassistant troubleshooting 2026-06-20 20:42:49 -07:00
index.md feat(gateway): per-platform typing_indicator toggle 2026-06-29 21:12:57 -07:00
irc.md docs: reconcile docs with code across last 3 releases (#54254) 2026-06-28 12:47:50 -07:00
line.md docs: deep audit — registry drift, stale claims, 2-week PR coverage, dashboard screenshot (#40952) 2026-06-07 01:39:06 -07:00
matrix.md docs: stop recommending pip install; curl installer is the only supported path (#51743) 2026-06-24 00:14:32 -07:00
mattermost.md docs: comprehensive 2-week sweep of feature/PR coverage gaps (#28497) 2026-05-18 23:55:25 -07:00
msgraph-webhook.md docs: deep audit — registry drift, stale claims, 2-week PR coverage, dashboard screenshot (#40952) 2026-06-07 01:39:06 -07:00
ntfy.md docs: reconcile docs with code across last 3 releases (#54254) 2026-06-28 12:47:50 -07:00
open-webui.md chore(scripts): drop Open WebUI local bootstrap script (#56178) 2026-07-01 01:30:40 -07:00
photon.md fix(photon): correct gateway start command (#45566) 2026-06-13 05:14:59 -07:00
qqbot.md docs: round 2 audit — messaging, developer-guide, guides, integrations (#22858) 2026-05-09 15:00:24 -07:00
raft.md feat(gateway): add Raft bundled platform plugin with activity hooks 2026-06-19 07:52:37 -07:00
signal.md docs(signal): clarify tool progress support (#40774) 2026-06-06 18:54:33 -07:00
simplex.md docs: reconcile docs with code across last 3 releases (#54254) 2026-06-28 12:47:50 -07:00
slack.md fix(slack): MPIMs (group DMs) obey shared-surface mention gating + reaction guard 2026-07-03 12:34:53 +05:30
sms.md docs: stop recommending pip install; curl installer is the only supported path (#51743) 2026-06-24 00:14:32 -07:00
teams-meetings.md docs: 30-day overhaul — correctness audit, PR coverage, Nous Portal weave, sidebar reorg (#33782) 2026-05-28 02:41:36 -07:00
teams.md fix(teams): package Microsoft Teams SDK as an installable extra (salvage #43945) (#46764) 2026-06-15 14:35:15 -04:00
telegram.md fix(telegram): gate rich draft previews separately 2026-06-24 18:11:14 -07:00
webhooks.md docs(webhook): clarify authenticated != trusted-content trust model (#53562) 2026-06-27 03:43:33 -07:00
wecom-callback.md docs: 30-day overhaul — correctness audit, PR coverage, Nous Portal weave, sidebar reorg (#33782) 2026-05-28 02:41:36 -07:00
wecom.md docs(wecom): stop implying live streaming and typing support (#38990) 2026-06-04 05:57:01 -07:00
weixin.md docs: stop recommending pip install; curl installer is the only supported path (#51743) 2026-06-24 00:14:32 -07:00
whatsapp-cloud.md feat(whatsapp): add WhatsApp Business Cloud API adapter 2026-05-23 01:07:01 -04:00
whatsapp.md Merge commit '6110aed9b' into feat/whatsapp-cloud-api 2026-06-10 21:39:22 -04:00
yuanbao.md fix(website): cross-locale doc links + drop empty ko locale (#31895) 2026-05-24 23:16:20 -07:00