diff options
author | Chris <ccbrown112@gmail.com> | 2017-08-29 16:14:59 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-29 16:14:59 -0500 |
commit | 213a072b38d29d3c3ec8e150584685b1144a7d6a (patch) | |
tree | 1da10a494e49914b0f6641db79e7dcf8ad3886f6 /model/client4.go | |
parent | 59798c137584a0b7e008ec713b489929dd83a690 (diff) | |
download | chat-213a072b38d29d3c3ec8e150584685b1144a7d6a.tar.gz chat-213a072b38d29d3c3ec8e150584685b1144a7d6a.tar.bz2 chat-213a072b38d29d3c3ec8e150584685b1144a7d6a.zip |
PLT-6403: Interactive messages (#7274)
* wip
* finish first pass
* requested changes
* add DoPostAction to Client4
Diffstat (limited to 'model/client4.go')
-rw-r--r-- | model/client4.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/model/client4.go b/model/client4.go index 0f7578539..26ea6ee03 100644 --- a/model/client4.go +++ b/model/client4.go @@ -1803,6 +1803,16 @@ func (c *Client4) SearchPosts(teamId string, terms string, isOrSearch bool) (*Po } } +// DoPostAction performs a post action. +func (c *Client4) DoPostAction(postId, actionId string) (bool, *Response) { + if r, err := c.DoApiPost(c.GetPostRoute(postId)+"/actions/"+actionId, ""); err != nil { + return false, BuildErrorResponse(r, err) + } else { + defer closeBody(r) + return CheckStatusOK(r), BuildResponse(r) + } +} + // File Section // UploadFile will upload a file to a channel, to be later attached to a post. |