TextMsgBuilder面对富文本出错
yindex opened this issue · 0 comments
yindex commented
如果消息中本身包含引号,那么通过该builder创建的消息则不是合法JSON数据。
测试代码如下
`
package main
import (
larkim "github.com/larksuite/oapi-sdk-go/v3/service/im/v1"
"fmt"
)
func main() {
content := larkim.NewTextMsgBuilder().
Text("invalid json"
).
Build()
fmt.Println(content)
}
`
或许可以这样?
.Text(msg) { buf["text"] = msg } .Build() { marshal? }