about summary refs log tree commit diff
path: root/app/workers/local_notification_worker.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/workers/local_notification_worker.rb')
-rw-r--r--app/workers/local_notification_worker.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/workers/local_notification_worker.rb b/app/workers/local_notification_worker.rb
index 6b08ca6fc..a22e2834d 100644
--- a/app/workers/local_notification_worker.rb
+++ b/app/workers/local_notification_worker.rb
@@ -12,6 +12,8 @@ class LocalNotificationWorker
       activity = activity_class_name.constantize.find(activity_id)
     end
 
+    return if Notification.where(account: receiver, activity: activity).any?
+
     NotifyService.new.call(receiver, type || activity_class_name.underscore, activity)
   rescue ActiveRecord::RecordNotFound
     true