feat: Notification on new messages in conversation (#1204)

fixes: #895
fixes: #1118
fixes: #1075

Co-authored-by: Pranav Raj S <pranav@thoughtwoot.com>
This commit is contained in:
Sojan Jose
2020-09-10 19:19:15 +05:30
committed by GitHub
parent 3b92c744d6
commit 31c07771e8
36 changed files with 259 additions and 94 deletions

View File

@@ -22,7 +22,7 @@ json.status conversation.status
json.muted conversation.muted?
json.can_reply conversation.can_reply?
json.timestamp conversation.messages.last.try(:created_at).try(:to_i)
json.user_last_seen_at conversation.user_last_seen_at.to_i
json.contact_last_seen_at conversation.contact_last_seen_at.to_i
json.agent_last_seen_at conversation.agent_last_seen_at.to_i
json.unread_count conversation.unread_incoming_messages.count
json.additional_attributes conversation.additional_attributes

View File

@@ -1,6 +1,6 @@
if @conversation
json.id @conversation.display_id
json.inbox_id @conversation.inbox_id
json.user_last_seen_at @conversation.user_last_seen_at.to_i
json.contact_last_seen_at @conversation.contact_last_seen_at.to_i
json.status @conversation.status
end