From 213a072b38d29d3c3ec8e150584685b1144a7d6a Mon Sep 17 00:00:00 2001 From: Chris Date: Tue, 29 Aug 2017 16:14:59 -0500 Subject: PLT-6403: Interactive messages (#7274) * wip * finish first pass * requested changes * add DoPostAction to Client4 --- model/client4.go | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'model/client4.go') 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. -- cgit v1.2.3-1-g7c22