fix: send label list not object in event data presenter (#5853)
This commit is contained in:
parent
b5f7be0cd2
commit
38ab3c36db
2 changed files with 1 additions and 5 deletions
|
@ -24,10 +24,6 @@ class Conversations::EventDataPresenter < SimpleDelegator
|
|||
[messages.chat.last&.push_event_data].compact
|
||||
end
|
||||
|
||||
def label_list
|
||||
labels.pluck(:id, :name)
|
||||
end
|
||||
|
||||
def push_meta
|
||||
{
|
||||
sender: contact.push_event_data,
|
||||
|
|
|
@ -149,7 +149,7 @@ describe ActionCableListener do
|
|||
end
|
||||
|
||||
it 'broadcast event with label data' do
|
||||
expect(conversation.reload.push_event_data[:labels]).to eq(conversation.labels.pluck(:id, :name))
|
||||
expect(conversation.reload.push_event_data[:labels]).to eq(conversation.labels.pluck(:name))
|
||||
|
||||
expect(ActionCableBroadcastJob).to receive(:perform_later).with(
|
||||
[agent.pubsub_token, admin.pubsub_token, conversation.contact_inbox.pubsub_token],
|
||||
|
|
Loading…
Reference in a new issue