소스 검색

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]: