diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2016-02-24 12:57:29 +0100 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2016-02-24 12:57:29 +0100 |
commit | fa7868675d0952f8e4e1aa2f6b77586bb56de2c1 (patch) | |
tree | 33b79c306943ade9c5bc49a06cfedf1e2aee231a /app/services/follow_remote_account_service.rb | |
parent | 10eb47a33e2f0c7f0eba5302319c4321db41294c (diff) |
Send Salmon interactions
Diffstat (limited to 'app/services/follow_remote_account_service.rb')
-rw-r--r-- | app/services/follow_remote_account_service.rb | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/app/services/follow_remote_account_service.rb b/app/services/follow_remote_account_service.rb index bb55362a6..de2ca6e75 100644 --- a/app/services/follow_remote_account_service.rb +++ b/app/services/follow_remote_account_service.rb @@ -1,6 +1,10 @@ -class FollowRemoteAccountService - include ApplicationHelper - +class FollowRemoteAccountService < BaseService + # Find or create a local account for a remote user. + # When creating, look up the user's webfinger and fetch all + # important information from their feed + # @param [String] uri User URI in the form of username@domain + # @param [Boolean] subscribe Whether to initiate a PubSubHubbub subscription + # @return [Account] def call(uri, subscribe = true) username, domain = uri.split('@') account = Account.where(username: username, domain: domain).first |