瀏覽代碼

slack update

Daniel Gibbs 4 年之前
父節點
當前提交
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"
 		},