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/incoming_webhook.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/incoming_webhook.go')
-rw-r--r-- | model/incoming_webhook.go | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/model/incoming_webhook.go b/model/incoming_webhook.go index de58093ff..ce755f889 100644 --- a/model/incoming_webhook.go +++ b/model/incoming_webhook.go @@ -28,13 +28,13 @@ type IncomingWebhook struct { } type IncomingWebhookRequest struct { - Text string `json:"text"` - Username string `json:"username"` - IconURL string `json:"icon_url"` - ChannelName string `json:"channel"` - Props StringInterface `json:"props"` - Attachments SlackAttachments `json:"attachments"` - Type string `json:"type"` + Text string `json:"text"` + Username string `json:"username"` + IconURL string `json:"icon_url"` + ChannelName string `json:"channel"` + Props StringInterface `json:"props"` + Attachments []*SlackAttachment `json:"attachments"` + Type string `json:"type"` } func (o *IncomingWebhook) ToJson() string { @@ -209,7 +209,7 @@ func IncomingWebhookRequestFromJson(data io.Reader) *IncomingWebhookRequest { } o.Text = ExpandAnnouncement(o.Text) - o.Attachments.Process() + o.Attachments = ProcessSlackAttachments(o.Attachments) return o } |