🐛 Bug fixes

This commit is contained in:
LittleSheep 2024-03-31 23:26:13 +08:00
parent 2797633589
commit 07fb64a680

View File

@ -31,6 +31,7 @@ func ListMessage(channel models.Channel, take int, offset int) ([]models.Message
Preload("Attachments").
Preload("ReplyTo").
Preload("ReplyTo.Sender").
Preload("ReplyTo.Sender.Account").
Preload("Sender").
Preload("Sender.Account").
Find(&messages).Error; err != nil {
@ -49,6 +50,7 @@ func GetMessage(channel models.Channel, id uint) (models.Message, error) {
}).
Preload("ReplyTo").
Preload("ReplyTo.Sender").
Preload("ReplyTo.Sender.Account").
Preload("Attachments").
Preload("Sender").
Preload("Sender.Account").