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.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/app/workers/local_notification_worker.rb b/app/workers/local_notification_worker.rb
new file mode 100644
index 000000000..748270563
--- /dev/null
+++ b/app/workers/local_notification_worker.rb
@@ -0,0 +1,12 @@
+# frozen_string_literal: true
+
+class LocalNotificationWorker
+  include Sidekiq::Worker
+
+  def perform(mention_id)
+    mention = Mention.find(mention_id)
+    NotifyService.new.call(mention.account, mention)
+  rescue ActiveRecord::RecordNotFound
+    true
+  end
+end