add support for markdown card in dingtalk & tg

This commit is contained in:
wangcham
2025-04-01 07:11:48 -04:00
parent 873a0339d8
commit 47acb63feb
4 changed files with 15 additions and 5 deletions

View File

@@ -131,7 +131,8 @@ class DingTalkAdapter(adapter.MessagePlatformAdapter):
client_id=config["client_id"],
client_secret=config["client_secret"],
robot_name = config["robot_name"],
robot_code=config["robot_code"]
robot_code=config["robot_code"],
markdown_card=config["markdown_card"]
)
async def reply_message(

View File

@@ -207,6 +207,9 @@ class TelegramAdapter(adapter.MessagePlatformAdapter):
"text": component['text'],
}
if self.config['markdown_card'] is True:
args["parse_mode"] = "MarkdownV2"
if quote_origin:
args['reply_to_message_id'] = message_source.source_platform_object.message.id