diff --git a/plugins/platforms/slack/adapter.py b/plugins/platforms/slack/adapter.py index 62a5fdcd5f2..736598dba88 100644 --- a/plugins/platforms/slack/adapter.py +++ b/plugins/platforms/slack/adapter.py @@ -3936,16 +3936,14 @@ class SlackAdapter(BasePlatformAdapter): return "" return ( f"You are connected to this Slack workspace as the bot " - f'"@{name}". The Slack adapter already applied authorization, mention, ' - f"and channel-routing rules before delivering this message. Treat every " - f"delivered turn as intentionally routed to you, including a message " - f"accepted from a free-response channel or active thread. Your own routing " - f'mention "@{name}" may have been removed from the model-visible text. ' - f"Do not ask for another mention, reject the message, or stay silent solely " - f'because "@{name}" is absent. In messages, each line is prefixed with the ' - f"sender's name, and visible mentions are shown as @DisplayName; a mention " - f"of any other participant is not a mention of you, even if their name is " - f"similar." + f'"@{name}". The adapter already applied mention and channel ' + f"routing; treat every delivered turn as intentionally routed to " + f'you. Your routing mention "@{name}" may have been stripped from ' + f'the visible text — do not reject or ignore a message solely ' + f'because "@{name}" is absent. In messages, each line is prefixed ' + f"with the sender's name, and visible mentions are shown as " + f"@DisplayName; a mention of any other participant is not a " + f"mention of you, even if their name is similar." ) async def _resolve_user_is_bot( diff --git a/tests/gateway/test_slack.py b/tests/gateway/test_slack.py index 15a0faf5eb4..d9acaefaf6b 100644 --- a/tests/gateway/test_slack.py +++ b/tests/gateway/test_slack.py @@ -1887,9 +1887,9 @@ class TestMessageRouting: assert msg_event.text == "Hi" assert "@WorkspaceBot" in prompt assert "already applied" in prompt - assert "may have been removed" in prompt - assert "Do not ask for another mention" in prompt - assert "free-response channel or active thread" in prompt + assert "may have been stripped" in prompt + assert "do not reject or ignore" in prompt + assert "intentionally routed" in prompt assert "not a mention of you" in prompt assert "Only treat a message as directed" not in prompt