Validate on creating a reaction notification (#3010)

This commit is contained in:
Anna Buianova 2019-05-31 14:30:17 +03:00 committed by Mac Siri
parent 8d50956f1a
commit a7332846df

View file

@ -55,7 +55,10 @@ module Notifications
notification.notified_at = Time.current
notification.read = false if json_data[:reaction][:aggregated_siblings].size > previous_siblings_size
notification_id = save_notification(notification)
# temporarily returning validations to prevent creating duplicate notifications
# notification_id = save_notification(notification)
notification.save!
notification_id = notification.id
OpenStruct.new(action: :saved, notification_id: notification_id)
end