PLT-6403: Interactive messages (#7274)

* wip

* finish first pass

* requested changes

* add DoPostAction to Client4
Этот коммит содержится в:
Chris
2017-08-29 16:14:59 -05:00
коммит произвёл GitHub
родитель 59798c1375
Коммит 213a072b38
18 изменённых файлов: 366 добавлений и 11 удалений

Просмотреть файл

@@ -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(&copy)
if err != nil {
return ""
} else {