Skip to content

Commit

Permalink
Fixes & updates chat.update (#232)
Browse files Browse the repository at this point in the history
* Makes the `text` property not required. It only is so in the case that blocks and attachments are missing.
* Adds the `blocks` property.

Docs for reference: https://api.slack.com/methods/chat.update
  • Loading branch information
jmnsf authored Aug 21, 2020
1 parent a74f9ab commit 8043c9b
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions lib/slack/web/docs/chat.update.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
"desc" : "Channel containing the message to be updated."
},
"text": {
"required" : true,
"required" : false,
"example" : "Hello world",
"desc" : "New text for the message, using the [default formatting rules](/docs/formatting)."
"desc" : "New text for the message, using the default formatting rules. It's not required when presenting blocks or attachments."
},
"attachments": {
"example" : "[{\"pretext\": \"pre-hello\", \"text\": \"text-world\"}]",
Expand All @@ -35,6 +35,11 @@
"required" : false,
"example" : "true",
"desc" : "Pass true to update the message as the authed user. [Bot users](/bot-users) in this context are considered authed users."
},
"blocks": {
"required" : false,
"example" : "[{\"type\": \"section\", \"text\": {\"type\": \"plain_text\", \"text\": \"Hello world\"}}]",
"desc": "A JSON-based array of structured blocks, presented as a URL-encoded string. If you don't include this field, the message's previous `blocks` will be retained. To remove previous `blocks`, include an empty array for this field."
}
},

Expand Down

0 comments on commit 8043c9b

Please sign in to comment.