Unclear support for `markdown_text` option.
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 45/100
Research direction
Start at lib/slack/web/api/endpoints/chat.rb around line 196 and inspect the chat_postMessage argument handling alongside the linked Slack API reference. Reproduce the requests with markdown_text alone and with both markdown_text and text; done means the client behavior and documented Slack constraints agree, with the resulting behavior covered or clearly documented.
Written by the indexing model from the issue text.
Description
I was attempting to send markdown_text ref to the chat_postMessage but am encountering some issues.
The reference docs indicate that when passing markdown_text, text should be omitted:
Accepts message text formatted in markdown. This argument should not be used in conjunction with blocks or text. Limit this field to 12,000 characters.
If I do so, eg. .chat_postMessage({ markdown_text: "*Hello*"}), an ArgumentError is raised as I haven't passed text.
If I pass text and markdown_text, eg. .chat_postMessage({ markdown_text: "*Hello*", text: "*Hello*", mrkdwn: false}), the request goes through to the API but then fails with a Slack::Web::Api::Errors::MarkdownTextConflict error.
I believe the current workaround is to use Slack::Messages::Formatting.markdown or some other conversion process.
Is this an intentional gap in the API? Happy to raise a PR to amend if not.
- Dominant language
- Ruby
- Stars
- 1.3k
- Forks
- 222
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 3
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from slack-ruby/slack-ruby-client
-
new feature question
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
slack-ruby/slack-ruby-client#586 · 3 comments ·
-
new feature web api
Difficulty 3/5 1-2 days Newbie friendliness 42/100
slack-ruby/slack-ruby-client#482 · 5 comments ·
-
new feature
Difficulty 4/5 3-5 days Newbie friendliness 35/100
slack-ruby/slack-ruby-client#414 · 14 comments ·
-
confirmed bug
Difficulty 3/5 1-2 days Newbie friendliness 35/100
slack-ruby/slack-ruby-client#409 · 5 comments ·
-
question
Difficulty 2/5 1-3 hours Newbie friendliness 25/100
slack-ruby/slack-ruby-client#385 ·
All issues in slack-ruby/slack-ruby-client
Similar issues
-
user-reported
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Kong/developer.konghq.com#7316 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
TheOdinProject/curriculum#31408 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
notch8/utk_knapsack#148 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 78/100
Homebrew/homebrew-cask#288729 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100