Created
December 10, 2015 16:53
-
-
Save henrypoydar/90c5dc01ea1e2eaa0551 to your computer and use it in GitHub Desktop.
For payloads sent to webdook urls generated by the Slack Button or in response to Slash Commands, text with @usernames or #channelnames is not linked when displayed in Slack, even with link_names set to 1 in the payload.
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
# Using an 'Incoming Webhook' url, the link_names directive works and #channel and @user are linked in payload text when displayed in Slack | |
curl -X POST --data-urlencode 'payload={"link_names": 1, "text": "This references the #general channel and the @hpoydar user using a webhook generated as an *Incoming Webhook* configuration", "attachments": [{"text": "Referencing the #general channel and the @hpoydar user in an attachment"}], "channel": "#demo", "username": "webhook-bot", "icon_emoji": ":large_blue_circle:"}' https://hooks.slack.com/services/INCOMING_WEBHOOK_URL | |
# Using a webhook url generated from the creation of a Slack Button, the link_names directive does not work and #channel and @user are not linked in payload text when displayed in Slack. Same goes for payloads returned in response to slash commands | |
curl -X POST --data-urlencode 'payload={"link_names": 1, "text": "This references the #general channel and the @hpoydar user using a webhook generated as from a *Slack Button* configuration", "attachments": [{"text": "Referencing the #general channel and the @hpoydar user in an attachment"}], "channel": "#demo", "username": "slack-button-bot", "icon_emoji": ":large_red_circle:"}' https://hooks.slack.com/services/SLASH_BUTTON_INCOMING_WEBHOOK_OR_SLASH_COMMAND |
Author
henrypoydar
commented
Dec 10, 2015
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment