From 0f483785bbf6207629c53d75d1a7911fbdb143dd Mon Sep 17 00:00:00 2001 From: walnuts1018 Date: Sun, 31 Mar 2024 20:12:04 +0900 Subject: [PATCH] fix block --- slack/slack.go | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/slack/slack.go b/slack/slack.go index 2de4a72..c65d91d 100644 --- a/slack/slack.go +++ b/slack/slack.go @@ -254,15 +254,7 @@ func (c *Client) ForwardMessage(ctx context.Context, everythingChannelID string, _, _, err = c.slackClient.PostMessageContext( ctx, everythingChannelID, - slack.MsgOptionBlocks( - &slack.SectionBlock{ - Type: slack.MBTSection, - Text: &slack.TextBlockObject{ - Type: slack.MarkdownType, - Text: fmt.Sprintf("<%s|`#%s`> %s", permalink, sourceChannelName, message.Text), - }, - }, - ), + slack.MsgOptionBlocks(blocks...), slack.MsgOptionDisableLinkUnfurl(), slack.MsgOptionIconURL(iconURL), slack.MsgOptionUsername(displayName),