summaryrefslogtreecommitdiffstats
path: root/model/client4.go
diff options
context:
space:
mode:
authorChris <ccbrown112@gmail.com>2017-08-29 16:14:59 -0500
committerGitHub <noreply@github.com>2017-08-29 16:14:59 -0500
commit213a072b38d29d3c3ec8e150584685b1144a7d6a (patch)
tree1da10a494e49914b0f6641db79e7dcf8ad3886f6 /model/client4.go
parent59798c137584a0b7e008ec713b489929dd83a690 (diff)
downloadchat-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.go10
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.