fix: send label list not object in event data presenter (#5853)

This commit is contained in:
Tejaswini Chile 2022-11-15 12:20:06 +05:30 committed by GitHub
parent b5f7be0cd2
commit 38ab3c36db
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 5 deletions

View file

@ -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,

View file

@ -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],