Open darewreck54 opened 1 year ago
Currently, the postMessage api take in a list of objects to build up the payload to send to slack.
postMessage
channelID, timestamp, err := e.slackApiClient.PostMessage( notification.channel, slack.MsgOptionUsername("Bot Name"), slack.MsgOptionText(titleText, false), slack.MsgOptionAttachments( slack.Attachment{ Blocks: slack.Blocks{ BlockSet: blocks, }, Color: notification.color, }, ), )
I'm wondering:
In the example above, I imagine it to be something like
e.slackApiClient.PostMessage(json)
jsonPayload = e.slackApiClient.CreateMessagePayload( notification.channel, slack.MsgOptionUsername("Bot Name"), slack.MsgOptionText(titleText, false), slack.MsgOptionAttachments( slack.Attachment{ Blocks: slack.Blocks{ BlockSet: blocks, }, Color: notification.color, }, ), )
Thanks, Derek
Currently, the
postMessage
api take in a list of objects to build up the payload to send to slack.I'm wondering:
In the example above, I imagine it to be something like
Thanks, Derek