summaryrefslogtreecommitdiffstats
path: root/api4
diff options
context:
space:
mode:
authorJoram Wilander <jwawilander@gmail.com>2018-08-24 06:16:17 -0400
committerGeorge Goldberg <george@gberg.me>2018-08-24 11:16:17 +0100
commit4de2e5206e23ee268b38f071ecd8fcbea0bbc80a (patch)
treebe3d191545afdfa91a861be69a04dd1f646a1e16 /api4
parent9599f1a52fd4b2d029113b3ec56bd75453ae4d7b (diff)
downloadchat-4de2e5206e23ee268b38f071ecd8fcbea0bbc80a.tar.gz
chat-4de2e5206e23ee268b38f071ecd8fcbea0bbc80a.tar.bz2
chat-4de2e5206e23ee268b38f071ecd8fcbea0bbc80a.zip
Support for interactive menus in message attachments (#9285)
Diffstat (limited to 'api4')
-rw-r--r--api4/post.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/api4/post.go b/api4/post.go
index 2568ade0a..b4edc5124 100644
--- a/api4/post.go
+++ b/api4/post.go
@@ -513,7 +513,12 @@ func doPostAction(c *Context, w http.ResponseWriter, r *http.Request) {
return
}
- if err := c.App.DoPostAction(c.Params.PostId, c.Params.ActionId, c.Session.UserId); err != nil {
+ actionRequest := model.DoPostActionRequestFromJson(r.Body)
+ if actionRequest == nil {
+ actionRequest = &model.DoPostActionRequest{}
+ }
+
+ if err := c.App.DoPostAction(c.Params.PostId, c.Params.ActionId, c.Session.UserId, actionRequest.SelectedOption); err != nil {
c.Err = err
return
}