Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SLACK] color side bar is not working in notification messages #156

Open
wreulicke opened this issue Jan 18, 2023 · 1 comment
Open

[SLACK] color side bar is not working in notification messages #156

wreulicke opened this issue Jan 18, 2023 · 1 comment

Comments

@wreulicke
Copy link

wreulicke commented Jan 18, 2023

Currently (1.15.0 or higher), the color sidebar is not working.
The "color" is only available for an element in attachments.
But, now, "blocks" is placed outside of "attachments".

So, to get the side color bar, we should change the position of the "blocks".

-	return &slack.WebhookMessage{Attachments: []slack.Attachment{{Color: clr}}, Blocks: &blocks}, nil
+	return &slack.WebhookMessage{Attachments: []slack.Attachment{{Color: clr, Blocks: &blocks}}}, nil

But, the attachments field is not recommended.
ref: https://api.slack.com/reference/messaging/payload

I cannot find a way to add a color side bar in Block Kit.

@wreulicke
Copy link
Author

Migration guide for Block Kit says color parameter does not have an alternative in Block Kit.
https://api.slack.com/messaging/attachments-to-blocks#direct_equivalents

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant