From e8bc65b439a912698b083b4daa93629dc0cc4f54 Mon Sep 17 00:00:00 2001 From: guohelu <19503896967@163.com> Date: Wed, 13 Nov 2024 19:44:38 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=8F=82=E6=95=B0?= =?UTF-8?q?=E9=94=99=E8=AF=AF=20#7545?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gcloud/shortcuts/message/send_msg.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/gcloud/shortcuts/message/send_msg.py b/gcloud/shortcuts/message/send_msg.py index 7c47fe2f2..95eb41cd9 100644 --- a/gcloud/shortcuts/message/send_msg.py +++ b/gcloud/shortcuts/message/send_msg.py @@ -53,10 +53,6 @@ def _get_bkchat_api(self): return "{}/{}".format(BK_CHAT_API_ENTRY, "prod/im/api/v1/send_msg") def send(self, executor, notify_type, notify_info, receivers, title, content, email_content=None): - # 兼容旧数据 - if not email_content: - email_content = content - notify_cmsi = [] notify_bkchat = [] for notify in notify_type: @@ -65,12 +61,12 @@ def send(self, executor, notify_type, notify_info, receivers, title, content, em else: notify_cmsi.append(notify) if settings.ENABLE_BK_CHAT_CHANNEL and notify_bkchat: - self.send_bkchat(notify_bkchat, email_content) + self.send_bkchat(notify_bkchat, content) send_message(executor, notify_cmsi, receivers, title, content, email_content) return True - def send_bkchat(self, notify, content=None): + def send_bkchat(self, notify, content): params = {"bk_app_code": settings.APP_CODE, "bk_app_secret": settings.SECRET_KEY} data = {