5
0
mirror of https://github.com/cwinfo/matterbridge.git synced 2024-11-22 08:10:26 +00:00

Add slack attachment support to matterhook

This commit is contained in:
Wim 2018-02-23 00:48:25 +01:00
parent f82a9cc7ac
commit 4f2ae7b73f

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"`
}