fix: Update unread_count being 0 if agent has not seen the conversation (#7690)
This commit is contained in:
@@ -166,11 +166,11 @@ class Conversation < ApplicationRecord
|
||||
end
|
||||
|
||||
def unread_messages
|
||||
messages.created_since(agent_last_seen_at)
|
||||
agent_last_seen_at.present? ? messages.created_since(agent_last_seen_at) : messages
|
||||
end
|
||||
|
||||
def unread_incoming_messages
|
||||
messages.incoming.created_since(agent_last_seen_at)
|
||||
unread_messages.incoming
|
||||
end
|
||||
|
||||
def push_event_data
|
||||
|
||||
Reference in New Issue
Block a user