Преглед на файлове

Add @here to 10 mins alert for UR

Foppe Hemminga преди 6 години
родител
ревизия
bdb310b830
променени са 1 файла, в които са добавени 2 реда и са изтрити 0 реда
  1. 2 0
      view.py

+ 2 - 0
view.py

@@ -32,6 +32,8 @@ def _send(send_json):
     webhooks = json.loads(webhooks_json)
     for webhook_key in webhooks:
         webhook = webhooks[webhook_key]
+        if 'Alert: 10 mins' in send_json['content'] and webhook_key == 'Unrelenting':
+            send_json['content'] = '@here ' + send_json['content']
         url = base_url+webhook
         response = requests.post(url, json=send_json)
         if response.status_code in [200, 204]: