Add slack attachment support to matterhook

This commit is contained in:
Wim 2018-02-23 00:48:25 +01:00
parent f82a9cc7ac
commit 4f2ae7b73f
1 changed files with 2 additions and 1 deletions

View File

@ -7,6 +7,7 @@ import (
"encoding/json"
"fmt"
"github.com/gorilla/schema"
"github.com/nlopes/slack"
"io"
"io/ioutil"
"log"
@ -22,7 +23,7 @@ type OMessage struct {
IconEmoji string `json:"icon_emoji,omitempty"`
UserName string `json:"username,omitempty"`
Text string `json:"text"`
Attachments interface{} `json:"attachments,omitempty"`
Attachments []slack.Attachment `json:"attachments,omitempty"`
Type string `json:"type,omitempty"`
Props map[string]interface{} `json:"props"`
}