larksuite / oapi-sdk-go

larksuite oapi sdk by golang
MIT License
430 stars 87 forks source link

Update larkim.MessageText #96

Open Nomango opened 1 year ago

Nomango commented 1 year ago

MessageText 直接用 strings.Builder 构造 json 内容,结果可能是无效的json内容,尤其是当 text 内容包含双引号、换行符、unicode的时候,必须用 \\\"\\\n 才可以。

所以 MessageText.Build() 也应该和其他类型一样,序列化为 json 并返回 (string, error),才更合理。

CLAassistant commented 1 year ago

CLA assistant check
All committers have signed the CLA.

Nomango commented 1 year ago

Signed CLA.