Skip to content

Commit

Permalink
Merge pull request ManageIQ#17875 from skateman/send-notification-id
Browse files Browse the repository at this point in the history
Send the notification ID when propagating a notification through WS
  • Loading branch information
martinpovolny authored Aug 17, 2018
2 parents 85cdfe6 + 42a4233 commit fa93766
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions app/models/notification.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,7 @@ def self.notification_text(name, message_params)
def emit_message
return unless ::Settings.server.asynchronous_notifications
notification_recipients.pluck(:id, :user_id).each do |id, user|
to_h[:id] = id
ActionCable.server.broadcast("notifications_#{user}", to_h)
ActionCable.server.broadcast("notifications_#{user}", to_h.merge(:id => id.to_s))
end
end

Expand Down

0 comments on commit fa93766

Please sign in to comment.