summaryrefslogtreecommitdiffstats
path: root/model/post.go
diff options
context:
space:
mode:
Diffstat (limited to 'model/post.go')
-rw-r--r--model/post.go24
1 files changed, 24 insertions, 0 deletions
diff --git a/model/post.go b/model/post.go
index 1dd0a4db6..635493c9d 100644
--- a/model/post.go
+++ b/model/post.go
@@ -121,6 +121,7 @@ type PostActionIntegration struct {
type PostActionIntegrationRequest struct {
UserId string `json:"user_id"`
+ PostId string `json:"post_id"`
Context StringInterface `json:"context,omitempty"`
}
@@ -351,6 +352,29 @@ func (r *PostActionIntegrationRequest) ToJson() string {
return string(b)
}
+func PostActionIntegrationRequesteFromJson(data io.Reader) *PostActionIntegrationRequest {
+ var o *PostActionIntegrationRequest
+ err := json.NewDecoder(data).Decode(&o)
+ if err != nil {
+ return nil
+ }
+ return o
+}
+
+func (r *PostActionIntegrationResponse) ToJson() string {
+ b, _ := json.Marshal(r)
+ return string(b)
+}
+
+func PostActionIntegrationResponseFromJson(data io.Reader) *PostActionIntegrationResponse {
+ var o *PostActionIntegrationResponse
+ err := json.NewDecoder(data).Decode(&o)
+ if err != nil {
+ return nil
+ }
+ return o
+}
+
func (o *Post) Attachments() []*SlackAttachment {
if attachments, ok := o.Props["attachments"].([]*SlackAttachment); ok {
return attachments