Extend Slack notification to support attachments#1716
Extend Slack notification to support attachments#1716aidan- wants to merge 1 commit intoFlexget:developfrom
Conversation
| 'icon_emoji': {'type': 'string'}, | ||
| 'icon_url': {'type': 'string', 'format': 'url'} | ||
| 'icon_url': {'type': 'string', 'format': 'url'}, | ||
| 'attachments': { |
There was a problem hiding this comment.
Attachments schema should have some required fields according to slack docs if I remember correctly.
There was a problem hiding this comment.
Also I'd consider some default values for some of the more crucial fields
There was a problem hiding this comment.
I just read over the documentation, it doesn't look like any of the fields are mandatory? This is shown in my example config which is actually two attachments (first being the picture, second being the content).
I'm also not sure what the benefit would be in setting defaults. My example config relies heavily on imdb_lookup but I can imagine we can't assume people are using that plugin let alone want to use attachments instead of a basic message.
|
https://api.slack.com/docs/message-attachments#attachment_structure About defaults, it's perfectly valid to use imdb lookup data as defaults, we do that with other templates as well. Just make sure to doc it properly. |
|
You wanna update this? |
|
Reopen if relevant |
Motivation for changes:
Detailed changes:
flexget/plugins/notifiers/slack.pyand add the additionalattachmentsschema.Config usage:
Extended from the existing example on the wiki:
Output:
A picture of the above config's output in slack:

To Do: