Daniel Gibbs 4 лет назад
Родитель
Сommit
7234648f28
1 измененных файлов с 17 добавлено и 10 удалено
  1. 17 10
      lgsm/functions/alert_slack.sh

+ 17 - 10
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"
 		},