Skip to content

[Fix] Log discarded automated Slack messages that mention other users - #1700

Open
mrubens wants to merge 1 commit into
developfrom
fix/log-ignored-automated-slack-mentions
Open

[Fix] Log discarded automated Slack messages that mention other users#1700
mrubens wants to merge 1 commit into
developfrom
fix/log-ignored-automated-slack-mentions

Conversation

@mrubens

@mrubens mrubens commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

What changed

Automated (app/bot-authored) Slack message events that mention users without mentioning the installed Roomote bot are discarded by design, but the discard was completely silent. The webhook now emits an info-level log naming the mentioned user IDs, the installed bot user ID, and the event's channel/ts/subtype/app_id/bot_id before dropping such an event.

Why this change was made

The silent drop hid real misconfigurations. Concretely: a Slack Workflow Builder message template can carry a mention token for the bot user of a previous Roomote installation. Slack renders the stale mention identically to a live one (a blue @roomote), so the workflow looks correct while its mentions reach a deleted bot user and Roomote never reacts. Diagnosing this required manually fetching message payloads from the Slack API; with this log line it is visible directly in api logs, including the exact stale user ID.

Routing behavior is intentionally unchanged: automation still only engages Roomote via an explicit mention of the currently installed bot user (or configured channel auto-start). This PR only makes the existing discard observable.

Impact

No behavior change for routing, task launch, or replies. Operators debugging "Roomote ignored an automated mention" reports can now find a log line identifying which user IDs were mentioned instead of the installed bot user.

Focused coverage: unit tests for the new log helper, including the real-world workflow payload shape (bot_message + app_id + stale mention), plus null cases for bot-mentioning, mention-free, Roomote-authored, and non-message events.

Automated (app/bot-authored) Slack messages that mention users without
mentioning the installed Roomote bot are discarded by design, but the
drop was completely silent. This hid real misconfigurations, e.g. a
Slack workflow whose message template still mentions the bot user of a
previous Roomote installation (Slack renders the stale mention
identically to a live one).

Add an info-level log in the webhook discard branch naming the
mentioned user IDs and the installed bot user ID so these cases are
diagnosable from api logs.
@roomote-community

roomote-community Bot commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

No code issues found. See task

Reviewed 31162a4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant