fix: issues

This commit is contained in:
Rogee
2024-09-03 09:55:51 +08:00
parent 1ed08159a3
commit cdeb22401b
2 changed files with 1 additions and 6 deletions

View File

@@ -90,8 +90,3 @@ func (c *ChannelMessage) GetMedias() string {
b, _ := json.Marshal([]ChannelMessageMedia{c.Medias})
return string(b)
}
func (c *ChannelMessage) GetMedia() string {
b, _ := json.Marshal(c.Medias)
return string(b)
}

View File

@@ -159,7 +159,7 @@ func (c *DBChannel) SaveMessage(ctx context.Context, msg *ChannelMessage) error
"#var": *message.Content,
})),
tbl.Media.SET(RawString(`media || #var::jsonb`, RawArgs{
"#var": msg.GetMedia(),
"#var": msg.GetMedias(),
})),
).WHERE(
tbl.GroupID.EQ(Int(message.GroupID)).AND(