about summary refs log tree commit diff
path: root/app/services/follow_service.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/services/follow_service.rb')
-rw-r--r--app/services/follow_service.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/app/services/follow_service.rb b/app/services/follow_service.rb
new file mode 100644
index 000000000..fc606730b
--- /dev/null
+++ b/app/services/follow_service.rb
@@ -0,0 +1,12 @@
+class FollowService
+  def call(source_account, uri)
+    target_account = follow_remote_account_service.(uri)
+    source_account.follow!(target_account)
+  end
+
+  private
+
+  def follow_remote_account_service
+    FollowRemoteAccountService.new
+  end
+end