Fix LatestConversationMessages preload
Load the conversation's selected root as well
This commit is contained in:
parent
434fc4672b
commit
1570988b98
@ -422,7 +422,7 @@ func (s *SQLStore) LatestConversationMessages() ([]api.Message, error) {
|
||||
Joins("JOIN (?) as sub on messages.conversation_id = sub.conversation_id AND messages.created_at = sub.max_created_at", subQuery).
|
||||
Group("messages.conversation_id").
|
||||
Order("created_at DESC").
|
||||
Preload("Conversation").
|
||||
Preload("Conversation.SelectedRoot").
|
||||
Find(&latestMessages).Error
|
||||
|
||||
if err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user