Skip to content
Snippets Groups Projects
Verified Commit 60bb8976 authored by psy's avatar psy
Browse files

add author icon

parent a2a6a989
No related branches found
No related tags found
No related merge requests found
......@@ -21,6 +21,24 @@ icons = {
'resolved': ':white_check_mark:'
}
'''
Example message:
{
"text": "Example message",
"attachments": [
{
"title": "Rocket.Chat",
"title_link": "https://rocket.chat",
"text": "Rocket.Chat, the best open source chat",
"image_url": "/images/integration-attachment-example.png",
"color": "#764FA5"
}
]
}
'''
'''
Example attachment:
......@@ -147,6 +165,7 @@ def send_alert_message(channel, alert):
"message_link": alert.get('generatorURL', '#'), # link for timestamp, mandatory to display timestamp
"collapsed": True, # collapse details by default
"author_name": alert['labels'].get('instance', 'unknown'),
"author_icon": "https://rocket.cccv.de/emoji-custom/molli.png",
"title": alert['annotations']['title'],
"fields": [{"short": True, "title": key, "value": value} for key, value in alert['labels'].items() if
key not in label_ignore_fields]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment