about summary refs log tree commit diff
path: root/app/services/mute_status_service.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/services/mute_status_service.rb')
-rw-r--r--app/services/mute_status_service.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/app/services/mute_status_service.rb b/app/services/mute_status_service.rb
new file mode 100644
index 000000000..bdf99232c
--- /dev/null
+++ b/app/services/mute_status_service.rb
@@ -0,0 +1,10 @@
+# frozen_string_literal: true
+
+class MuteStatusService < BaseService
+  def call(account, status)
+    return if account.blank? || status.blank?
+
+    account.mute_status!(status)
+    FeedManager.instance.unpush_status(account, status)
+  end
+end