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/post_list.go | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'model/post_list.go') diff --git a/model/post_list.go b/model/post_list.go index 63f6d6825..b3caadafd 100644 --- a/model/post_list.go +++ b/model/post_list.go @@ -20,8 +20,20 @@ func NewPostList() *PostList { } } +func (o *PostList) StripActionIntegrations() { + posts := o.Posts + o.Posts = make(map[string]*Post) + for id, post := range posts { + pcopy := *post + pcopy.StripActionIntegrations() + o.Posts[id] = &pcopy + } +} + func (o *PostList) ToJson() string { - b, err := json.Marshal(o) + copy := *o + copy.StripActionIntegrations() + b, err := json.Marshal(©) if err != nil { return "" } else { -- cgit v1.2.3-1-g7c22