From dd8d3051a2c1c81276a7a369e2de4a1e8ad3b682 Mon Sep 17 00:00:00 2001 From: zhanhuasheng Date: Wed, 24 Jul 2024 18:41:39 +0800 Subject: [PATCH] =?UTF-8?q?bugfix=20-=20channel=E4=B8=AD=E7=9A=84memberCou?= =?UTF-8?q?nt=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Utils/webhook_handler.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Utils/webhook_handler.py b/Utils/webhook_handler.py index f2fa96b..4742faf 100644 --- a/Utils/webhook_handler.py +++ b/Utils/webhook_handler.py @@ -8,16 +8,16 @@ import urllib.parse timestamp = str(round(time.time() * 1000)) -# secret = 'SEC7c41f8b0298b348ed538883c49068185b75c510d64dcb988fc570cb7614f07ff' #正式的webhook -secret = 'SEC9d91939234e83369cba32c0ca4bcd9af60b5b1f69424d6fabd36f48d572a151c' #测试用的webhook +secret = 'SEC7c41f8b0298b348ed538883c49068185b75c510d64dcb988fc570cb7614f07ff' #正式的webhook +# secret = 'SEC9d91939234e83369cba32c0ca4bcd9af60b5b1f69424d6fabd36f48d572a151c' #测试用的webhook secret_enc = secret.encode('utf-8') string_to_sign = '{}\n{}'.format(timestamp, secret) string_to_sign_enc = string_to_sign.encode('utf-8') hmac_code = hmac.new(secret_enc, string_to_sign_enc, digestmod=hashlib.sha256).digest() sign = urllib.parse.quote_plus(base64.b64encode(hmac_code)) -webhook_url = 'https://oapi.dingtalk.com/robot/send?access_token=22fda27990b00841c3201c20649c0a8abb6da82d8472b6f6154ef4cd9dadb33f' #测试用的webhook -# webhook_url = 'https://oapi.dingtalk.com/robot/send?access_token=c7d3c3a67db4cf7b3472e62005a25ce202daac8095f32530687afdb91f1616b6' #正式的webhook +# webhook_url = 'https://oapi.dingtalk.com/robot/send?access_token=22fda27990b00841c3201c20649c0a8abb6da82d8472b6f6154ef4cd9dadb33f' #测试用的webhook +webhook_url = 'https://oapi.dingtalk.com/robot/send?access_token=c7d3c3a67db4cf7b3472e62005a25ce202daac8095f32530687afdb91f1616b6' #正式的webhook class webhookHandler: def __init__(self,webhookUrl = f"{webhook_url}×tamp={timestamp}&sign={sign}"): -- GitLab