fix: Add missing timestamp in the real-time event (#6349)

* fix: Add missing timestamp in the real-time event

* Fix broken specs
This commit is contained in:
Pranav Raj S
2023-01-25 15:21:41 -08:00
committed by GitHub
parent b1ec67d110
commit 5d331f0bb2
3 changed files with 4 additions and 1 deletions

View File

@@ -38,7 +38,8 @@ class Conversations::EventDataPresenter < SimpleDelegator
{
agent_last_seen_at: agent_last_seen_at.to_i,
contact_last_seen_at: contact_last_seen_at.to_i,
timestamp: last_activity_at.to_i
timestamp: last_activity_at.to_i,
created_at: created_at.to_i
}
end
end

View File

@@ -458,6 +458,7 @@ RSpec.describe Conversation, type: :model do
first_reply_created_at: nil,
contact_last_seen_at: conversation.contact_last_seen_at.to_i,
agent_last_seen_at: conversation.agent_last_seen_at.to_i,
created_at: conversation.created_at.to_i,
unread_count: 0
}
end

View File

@@ -30,6 +30,7 @@ RSpec.describe Conversations::EventDataPresenter do
first_reply_created_at: nil,
contact_last_seen_at: conversation.contact_last_seen_at.to_i,
agent_last_seen_at: conversation.agent_last_seen_at.to_i,
created_at: conversation.created_at.to_i,
unread_count: 0
}
end