diff --git a/app/listeners/action_cable_listener.rb b/app/listeners/action_cable_listener.rb index 5aac56db3e7b4..99a8fe2af146c 100644 --- a/app/listeners/action_cable_listener.rb +++ b/app/listeners/action_cable_listener.rb @@ -18,7 +18,7 @@ def notification_deleted(event) notification, account, unread_count, count = extract_notification_and_account(event) tokens = [event.data[:notification].user.pubsub_token] - broadcast(account, tokens, NOTIFICATION_DELETED, { notification: notification.push_event_data, unread_count: unread_count, count: count }) + broadcast(account, tokens, NOTIFICATION_DELETED, { notification: { id: notification.id }, unread_count: unread_count, count: count }) end def account_cache_invalidated(event) diff --git a/spec/listeners/action_cable_listener_spec.rb b/spec/listeners/action_cable_listener_spec.rb index 5802ce00adc32..b353f330d5dd2 100644 --- a/spec/listeners/action_cable_listener_spec.rb +++ b/spec/listeners/action_cable_listener_spec.rb @@ -142,7 +142,9 @@ 'notification.deleted', { account_id: notification.account_id, - notification: notification.push_event_data, + notification: { + id: notification.id + }, unread_count: 1, count: 1 }