feat(perf): improve performance of conversation filter API [CW-1605] (#7120)
* feat(perf): don't use count * feat(perf): include messages in the conversation query * feat: include contact inboxes * refactor: use blank?
This commit is contained in:
@@ -58,8 +58,9 @@ class Conversations::FilterService < FilterService
|
||||
|
||||
def conversations
|
||||
@conversations = @conversations.includes(
|
||||
:taggings, :inbox, { assignee: { avatar_attachment: [:blob] } }, { contact: { avatar_attachment: [:blob] } }, :team
|
||||
:taggings, :inbox, { assignee: { avatar_attachment: [:blob] } }, { contact: { avatar_attachment: [:blob] } }, :team, :messages, :contact_inbox
|
||||
)
|
||||
|
||||
@conversations.latest.page(current_page)
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user