feat: Add Contacts page (#1335)

Co-authored-by: Sojan <sojan@pepalo.com>
Co-authored-by: Pranav Raj Sreepuram <pranavrajs@gmail.com>
This commit is contained in:
Nithin David Thomas
2020-11-10 15:25:26 +05:30
committed by GitHub
parent 2babfd6148
commit f214c9c47c
41 changed files with 1163 additions and 179 deletions

View File

@@ -62,9 +62,7 @@ class ConversationFinder
end
def find_all_conversations
@conversations = current_account.conversations.includes(
:assignee, :inbox, :taggings, contact: [:avatar_attachment]
).where(inbox_id: @inbox_ids)
@conversations = current_account.conversations.where(inbox_id: @inbox_ids)
end
def filter_by_assignee_type
@@ -106,6 +104,9 @@ class ConversationFinder
end
def conversations
@conversations = @conversations.includes(
:taggings, :inbox, { assignee: { avatar_attachment: [:blob] } }, { contact: { avatar_attachment: [:blob] } }
)
current_page ? @conversations.latest.page(current_page) : @conversations.latest
end
end

View File

@@ -11,7 +11,7 @@ class MessageFinder
private
def conversation_messages
@conversation.messages.includes(:attachments, :sender)
@conversation.messages.includes(:attachments, :sender, sender: { avatar_attachment: [:blob] })
end
def messages