Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add the mrkdwn_in property to format on attachment fields. #30

Merged
merged 3 commits into from
Jun 10, 2016

Conversation

hfm
Copy link
Contributor

@hfm hfm commented Jun 9, 2016

By default attachment fields will not be formatted.
To enable it, set mrkdwn_in property on attachments.
See also https://api.slack.com/docs/formatting#message_formatting .

hfm added 2 commits June 9, 2016 14:40
By default attachment fields will not be formatted.
To enable it, set `mrkdwn_in` property on attachments.
See also https://api.slack.com/docs/formatting#message_formatting .
@@ -63,6 +63,7 @@ def payload
color: color,
text: text,
fields: fields,
mrkdwn_in: [fetch(:slack_mrkdwn_in)].flatten,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given that the default is an array, could we do without [].flatten here and just fetch(:slack_mrkdwn_id) ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, I'll fix it.

@seenmyfate
Copy link
Contributor

@hfm that's great, thanks

@seenmyfate seenmyfate merged commit 4c8836a into craigbrad:master Jun 10, 2016
@hfm hfm deleted the mrkdwn_in branch June 10, 2016 10:52
@hfm
Copy link
Contributor Author

hfm commented Jun 10, 2016

thanks!

@seenmyfate
Copy link
Contributor

This is now available in v2.8.0 from Rubygems

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.

2 participants