From 7234648f281a10a1da926308ac103541d5dcde07 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs <me@danielgibbs.co.uk> Date: Fri, 15 Oct 2021 13:01:37 +0100 Subject: [PATCH] slack update --- lgsm/functions/alert_slack.sh | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/lgsm/functions/alert_slack.sh b/lgsm/functions/alert_slack.sh index e0a185c53..c89e30033 100755 --- a/lgsm/functions/alert_slack.sh +++ b/lgsm/functions/alert_slack.sh @@ -37,14 +37,26 @@ json=$(cat <<EOF "text": { "type": "mrkdwn", "text": "*${alertemoji} ${alerttitle}* \n ${alertmessage}" + }, + "accessory": { + "type": "image", + "image_url": "${alertimage}", + "alt_text": "Alert Image" } }, { - "type": "section", - "text": { - "type": "mrkdwn", - "text": "*Game:* ${gamename}" - } + "type": "context", + "elements": [ + { + "type": "image", + "image_url": "${alerticon}", + "alt_text": "Alert Icon" + }, + { + "type": "mrkdwn", + "text": "*Game:* ${gamename}" + } + ] }, { "type": "section", @@ -95,11 +107,6 @@ json=$(cat <<EOF "text": "*Message*\n${alertmessage} \n More info: ${alerturl}" } }, - { - "type": "image", - "image_url": "${alertimage}", - "alt_text": "${gamename}" - }, { "type": "divider" },