fix: Rename unread_since scope (#7267)
- This renames the unread_since scope to created_since, which more accurately describes what the scope returns. - The EXTRACT(EPOCH FROM created_at) > (?) clause was also simplified and rewritten as created_at > ?, which is equivalent:
This commit is contained in:
@@ -166,11 +166,11 @@ class Conversation < ApplicationRecord
|
||||
end
|
||||
|
||||
def unread_messages
|
||||
messages.unread_since(agent_last_seen_at)
|
||||
messages.created_since(agent_last_seen_at)
|
||||
end
|
||||
|
||||
def unread_incoming_messages
|
||||
messages.incoming.unread_since(agent_last_seen_at)
|
||||
messages.incoming.created_since(agent_last_seen_at)
|
||||
end
|
||||
|
||||
def push_event_data
|
||||
|
||||
Reference in New Issue
Block a user