Skip to content

Commit 617480c

Browse files
author
linya.jj
committed
feat: release v0.5.2 离线提示词支持markdown语法
1 parent 70b81f6 commit 617480c

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

dingtalk_stream/chatbot.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ class ChatbotHandler(CallbackHandler):
198198
def set_off_duty_prompt(self, text: str, title: str = "", logo: str = ""):
199199
"""
200200
设置离线提示词,需要使用OpenAPI,当前仅支持自建应用。
201-
:param text: 离线提示词
201+
:param text: 离线提示词,支持markdown
202202
:param title: 机器人名称,默认:"钉钉Stream机器人"
203203
:param logo: 机器人logo,默认:"@lALPDfJ6V_FPDmvNAfTNAfQ"
204204
:return:

dingtalk_stream/interactive_card.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def generate_multi_text_line_card_data(title: str, logo: str, texts: [str]) -> d
5252
card_data["contents"] = []
5353
for text in texts:
5454
text_line = {
55-
"type": "text",
55+
"type": "markdown",
5656
"text": text,
5757
"id": "text_" + str(uuid.uuid1())
5858
}
@@ -116,7 +116,7 @@ def generate_multi_text_image_card_data(title: str, logo: str, texts: [str], ima
116116
card_data["contents"] = []
117117
for text in texts:
118118
text_line = {
119-
"type": "text",
119+
"type": "markdown",
120120
"text": text,
121121
"id": "text_" + str(uuid.uuid1())
122122
}

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
setup(
44
name='dingtalk-stream',
5-
version='0.5.1',
5+
version='0.5.2',
66
description='A Python library for sending messages to DingTalk chatbot',
77
long_description=open('README.md').read(),
88
long_description_content_type='text/markdown',

0 commit comments

Comments
 (0)