Merge pull request #1265 from RockChinQ/feat/markdowncard

add support for markdown card in dingtalk & tg
This commit is contained in:
Junyan Qin (Chin)
2025-04-01 20:01:44 +08:00
committed by GitHub
7 changed files with 52 additions and 6 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