Optimize history pulling

This commit is contained in:
LittleSheep 2024-03-31 23:25:09 +08:00
parent 054e91f5f8
commit 2797633589

View File

@ -31,7 +31,6 @@ 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 {
@ -50,7 +49,6 @@ 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").