about summary refs log tree commit diff
path: root/app/services/unmute_service.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/services/unmute_service.rb')
-rw-r--r--app/services/unmute_service.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/app/services/unmute_service.rb b/app/services/unmute_service.rb
new file mode 100644
index 000000000..6aeea358f
--- /dev/null
+++ b/app/services/unmute_service.rb
@@ -0,0 +1,11 @@
+# frozen_string_literal: true
+
+class UnmuteService < BaseService
+  def call(account, target_account)
+    return unless account.muting?(target_account)
+
+    account.unmute!(target_account)
+
+    MergeWorker.perform_async(target_account.id, account.id) if account.following?(target_account)
+  end
+end