Codebase list golang-github-nlopes-slack / 5e8064e
Merge pull request #64 from AlphaB/unfurl-as-user Posting message as user shouldn't unfurls links Norberto Lopes 8 years ago
1 changed file(s) with 5 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
124124 if params.UnfurlLinks != DEFAULT_MESSAGE_UNFURL_LINKS {
125125 values.Set("unfurl_links", "true")
126126 }
127 // I want to send a message with explicit `as_user` `true` and `unfurl_links` `false` in request.
128 // Because setting `as_user` to `true` will change the default value for `unfurl_links` to `true` on Slack API side.
129 if params.AsUser != DEFAULT_MESSAGE_ASUSER && params.UnfurlLinks == DEFAULT_MESSAGE_UNFURL_LINKS {
130 values.Set("unfurl_links", "false")
131 }
127132 if params.UnfurlMedia != DEFAULT_MESSAGE_UNFURL_MEDIA {
128133 values.Set("unfurl_media", "false")
129134 }