diff options
author | Chris <ccbrown112@gmail.com> | 2017-08-03 18:25:47 -0500 |
---|---|---|
committer | Christopher Speller <crspeller@gmail.com> | 2017-08-03 16:25:47 -0700 |
commit | df1ff4ec977b76587dfc50885874f08fd9748071 (patch) | |
tree | 3481e612ca9b885509f8332ac1f84ee46d1e9756 /model/command_response.go | |
parent | dc884983e625fb7a9309361de26b7dcbc0fd736a (diff) | |
download | chat-df1ff4ec977b76587dfc50885874f08fd9748071.tar.gz chat-df1ff4ec977b76587dfc50885874f08fd9748071.tar.bz2 chat-df1ff4ec977b76587dfc50885874f08fd9748071.zip |
PLT-7212: fix missing webhook post attachments (#7011)
* fix missing webhook post attachments
* make ProcessSlackAttachments return a new slice instead of modifying it
Diffstat (limited to 'model/command_response.go')
-rw-r--r-- | model/command_response.go | 14 |
1 files changed, 7 insertions, 7 deletions
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 } |