chore: Add custom attributes in conversation webhook payload (#3839)

This commit is contained in:
Muhsin Keloth 2022-02-03 10:05:56 +05:30 committed by GitHub
parent fc1f257793
commit 903072ef14
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 0 deletions

View file

@ -10,6 +10,7 @@ class Conversations::EventDataPresenter < SimpleDelegator
messages: push_messages, messages: push_messages,
meta: push_meta, meta: push_meta,
status: status, status: status,
custom_attributes: custom_attributes,
snoozed_until: snoozed_until, snoozed_until: snoozed_until,
unread_count: unread_incoming_messages.count, unread_count: unread_incoming_messages.count,
**push_timestamps **push_timestamps

View file

@ -386,6 +386,7 @@ RSpec.describe Conversation, type: :model do
can_reply: true, can_reply: true,
channel: 'Channel::WebWidget', channel: 'Channel::WebWidget',
snoozed_until: conversation.snoozed_until, snoozed_until: conversation.snoozed_until,
custom_attributes: conversation.custom_attributes,
contact_last_seen_at: conversation.contact_last_seen_at.to_i, contact_last_seen_at: conversation.contact_last_seen_at.to_i,
agent_last_seen_at: conversation.agent_last_seen_at.to_i, agent_last_seen_at: conversation.agent_last_seen_at.to_i,
unread_count: 0 unread_count: 0

View file

@ -24,6 +24,7 @@ RSpec.describe Conversations::EventDataPresenter do
channel: conversation.inbox.channel_type, channel: conversation.inbox.channel_type,
timestamp: conversation.last_activity_at.to_i, timestamp: conversation.last_activity_at.to_i,
snoozed_until: conversation.snoozed_until, snoozed_until: conversation.snoozed_until,
custom_attributes: conversation.custom_attributes,
contact_last_seen_at: conversation.contact_last_seen_at.to_i, contact_last_seen_at: conversation.contact_last_seen_at.to_i,
agent_last_seen_at: conversation.agent_last_seen_at.to_i, agent_last_seen_at: conversation.agent_last_seen_at.to_i,
unread_count: 0 unread_count: 0