mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-08-31 15:11:27 +00:00
fix: send slack message failed
This commit is contained in:
@@ -27,7 +27,7 @@ class SlackRenderer(mistune.HTMLRenderer):
|
||||
def strong(self, text):
|
||||
return '*' + text + '*'
|
||||
|
||||
def list(self, text, **kwargs):
|
||||
def list(self, text, *args, **kwargs):
|
||||
lines = text.split('\n')
|
||||
for i, line in enumerate(lines):
|
||||
if not line:
|
||||
@@ -128,7 +128,7 @@ class Slack:
|
||||
|
||||
def send_text(self, user_ids, msg_body):
|
||||
body = self.convert_to_markdown(msg_body)
|
||||
logger.info(f'Slack send text: user_ids={user_ids} msg={body}')
|
||||
logger.info(f'Slack send text: user_ids={user_ids}')
|
||||
for user_id in user_ids:
|
||||
body['channel'] = user_id
|
||||
try:
|
||||
|
Reference in New Issue
Block a user