Skip to content

[slack] [bug] preserve self mentions in multi-workspace installs#328

Closed
mdnanocom wants to merge 1 commit intovercel:mainfrom
mdnanocom:main
Closed

[slack] [bug] preserve self mentions in multi-workspace installs#328
mdnanocom wants to merge 1 commit intovercel:mainfrom
mdnanocom:main

Conversation

@mdnanocom
Copy link
Copy Markdown

Summary

In multi-workspace Slack installs, the adapter was only preserving self mentions with the adapter-level _botUserId. For OAuth-installed workspaces, the active bot identity is request-scoped, so <@BOT_USER_ID> could be rewritten before mention detection ran.

This change makes self-mention preservation use the effective request-scoped botUserId, so plain Slack message events still trigger onNewMention() correctly in multi-workspace installs.

What changed

  • use this.botUserId instead of only _botUserId in resolveInlineMentions()
  • add a unit regression for request-scoped multi-workspace bot identity
  • add a replay regression covering a plain message event with a bot self mention

this.botUserId already falls back to _botUserId when there is no request-scoped context, so single-workspace behavior stays the same.

Note

The core bug affects plain Slack message events that rely on fallback mention detection. app_mention events are already marked as mentions separately.

@vercel
Copy link
Copy Markdown
Contributor

vercel bot commented Apr 5, 2026

@mdnanocom is attempting to deploy a commit to the Vercel Labs Team on Vercel.

A member of the Team first needs to authorize it.

@mdnanocom mdnanocom changed the title [slack] preserve self mentions in multi-workspace installs [slack] [bug] preserve self mentions in multi-workspace installs Apr 5, 2026
@mdnanocom mdnanocom closed this Apr 9, 2026
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