Skip to content

Commit

Permalink
fix: 修复参数错误 TencentBlueKing#7545
Browse files Browse the repository at this point in the history
  • Loading branch information
guohelu committed Nov 13, 2024
1 parent 2d636fc commit e8bc65b
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions gcloud/shortcuts/message/send_msg.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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 = {
Expand Down

0 comments on commit e8bc65b

Please sign in to comment.