feat: enhance JSON marshaling for Message and skip Fluent Read links in chat items

This commit is contained in:
CaIon
2025-08-09 20:58:28 +08:00
parent 8639699d49
commit a47fc5a76b
2 changed files with 16 additions and 0 deletions

View File

@@ -140,6 +140,14 @@ type Message struct {
//parsedStringContent *string
}
func (m *Message) MarshalJSON() ([]byte, error) {
if m.Content == nil {
m.Content = ""
}
type Alias Message
return json.Marshal((*Alias)(m))
}
type MediaContent struct {
Type string `json:"type"`
Text string `json:"text,omitempty"`