Repository navigation
feat: add native Slack message forwarding - #7
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
conversations_forward_message, a browser-session-only MCP write tool for native Slack message forwarding.SLACK_MCP_FORWARD_MESSAGE_TOOLdestination-channel policies or explicitSLACK_MCP_ENABLED_TOOLSregistration.Why and mechanism
A native forward is not a
chat.postMessagevariant. This change calls the internal web-client endpoint used by Slack itself:Slack constructs the embedded share attachment server-side from
channelandtimestamp. The source permalink is used only to derive those two values and is never copied into the outer message text.The implementation deliberately rejects the two lookalikes that do not produce a true native forward:
chat.postMessagewithattachments: [{from_url: ...}]: Slack strips the synthetic attachment, yielding zero attachments.textwithunfurl_links=true: Slack may asynchronously unfurl it, but the raw permalink remains visible in the message.Readback proof
The verified readback shape for a message created through
chat.shareMessageis:{ "text": "<optional comment only; no http substring>", "attachments": [ { "is_msg_unfurl": true, "is_share": true, "author_name": "<original author>", "from_url": "<source message URL>", "blocks": ["<original source blocks>"] } ] }That distinguishes the native forward from a visible-link unfurl: the outer
textcontains only the optional comment, while the original author, blocks, and message actions live in Slack's server-generated share attachment.Verification
make testmake buildBoth pass with the repository's Go 1.25 Docker toolchain. The endpoint tests assert the form-encoded
chat.shareMessagerequest,tokenform field,dcookie, source/destination parameters, optional rich-text comment blocks, Slack API error propagation, and OAuth rejection.