lark
lark copied to clipboard
Does it support multi-lines post message
Currently I found it seems do not support multi-lines message when I'm using the PostNotificationV2 method.
Am I missing something?
Will it be supported?
Thanks.
Currently I found it seems do not support multi-lines message when I'm using the
PostNotificationV2method.Am I missing something?
Will it be supported?
Thanks.
May I ask what is a multi-line message? I think it's available to just use \n to post multi-line.
Great, using \n to start a new line works fine.
I saw there's a different example from the official docs to post a rich text, as follows:
{
"chat_id": "oc_5ce6d572455d361153b7cb51da133945",
"msg_type": "post",
"content": {
"post": {
"zh_cn": {
"title": "I am a title",
"content": [
[
{
"tag": "text",
"un_escape": true,
"text": "line 1 :",
},
{
"tag": "a",
"text": "super link",
"href": "www.baidu.com"
},
{
"tag": "at",
"user_id": "ou_18eac85d35a26f989317ad4f02e8bbbb"
}
],
[
{
"tag": "text",
"text": "line 2 :",
},
{
"tag": "text",
"text": "text content",
}
],
[
{
"tag": "text",
"text": "",
},
{
"tag": "img",
"image_key": "b15a91e5-156d-4d81-8bac-3d27c321001b",
"width": 300,
"height": 300
}
]
]
}
}
}
}
It seems currently this package do not support the above rich text. Do you think it's better to support it?
Great, using
\nto start a new line works fine.I saw there's a different example from the official docs to post a rich text, as follows:
{ "chat_id": "oc_5ce6d572455d361153b7cb51da133945", "msg_type": "post", "content": { "post": { "zh_cn": { "title": "I am a title", "content": [ [ { "tag": "text", "un_escape": true, "text": "line 1 :", }, { "tag": "a", "text": "super link", "href": "www.baidu.com" }, { "tag": "at", "user_id": "ou_18eac85d35a26f989317ad4f02e8bbbb" } ], [ { "tag": "text", "text": "line 2 :", }, { "tag": "text", "text": "text content", } ], [ { "tag": "text", "text": "", }, { "tag": "img", "image_key": "b15a91e5-156d-4d81-8bac-3d27c321001b", "width": 300, "height": 300 } ] ] } } } }It seems currently this package do not support the above rich text. Do you think it's better to support it?
This is available but you may use MsgBuffer to build one. Refer to here: https://github.com/go-lark/lark/blob/main/api_notification_test.go#L39