Collapsable slack post

This commit is contained in:
Daniel Mason 2021-09-02 09:56:00 +12:00
parent 4c283f1cbb
commit 903012231a
Signed by: idanoo
GPG key ID: 387387CDBC02F132

View file

@ -2,6 +2,7 @@ package nzcovidbot
import (
"fmt"
"strings"
"github.com/ashwanthkumar/slack-go-webhook"
)
@ -19,10 +20,9 @@ func postToSlack() {
return
}
rawText := strings.Join(postableData, "\n")
attachment1 := slack.Attachment{}
for _, v := range postableData {
attachment1.AddField(slack.Field{Value: v})
}
attachment1.Text = &rawText
payload := slack.Payload{
Text: "New Locations of Interest!",