From df1ff4ec977b76587dfc50885874f08fd9748071 Mon Sep 17 00:00:00 2001 From: Chris Date: Thu, 3 Aug 2017 18:25:47 -0500 Subject: PLT-7212: fix missing webhook post attachments (#7011) * fix missing webhook post attachments * make ProcessSlackAttachments return a new slice instead of modifying it --- model/command_response.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'model/command_response.go') diff --git a/model/command_response.go b/model/command_response.go index e3253acc0..27d39e173 100644 --- a/model/command_response.go +++ b/model/command_response.go @@ -14,12 +14,12 @@ const ( ) type CommandResponse struct { - ResponseType string `json:"response_type"` - Text string `json:"text"` - Username string `json:"username"` - IconURL string `json:"icon_url"` - GotoLocation string `json:"goto_location"` - Attachments SlackAttachments `json:"attachments"` + ResponseType string `json:"response_type"` + Text string `json:"text"` + Username string `json:"username"` + IconURL string `json:"icon_url"` + GotoLocation string `json:"goto_location"` + Attachments []*SlackAttachment `json:"attachments"` } func (o *CommandResponse) ToJson() string { @@ -40,7 +40,7 @@ func CommandResponseFromJson(data io.Reader) *CommandResponse { } o.Text = ExpandAnnouncement(o.Text) - o.Attachments.Process() + o.Attachments = ProcessSlackAttachments(o.Attachments) return &o } -- cgit v1.2.3-1-g7c22