Rename FollowRemoteAccountService to ResolveRemoteAccountService (#3847)

Rename Activitypub to ActivityPub
This commit is contained in:
Eugen Rochko 2017-06-19 01:51:04 +02:00 committed by GitHub
parent aebebdc5d1
commit f3be605286
20 changed files with 25 additions and 24 deletions

View file

@ -18,7 +18,7 @@ class AccountSearchService < BaseService
return [] if query_blank_or_hashtag? || limit < 1
if resolving_non_matching_remote_account?
[FollowRemoteAccountService.new.call("#{query_username}@#{query_domain}")]
[ResolveRemoteAccountService.new.call("#{query_username}@#{query_domain}")]
else
search_results_and_exact_match.compact.uniq.slice(0, limit)
end

View file

@ -18,6 +18,6 @@ module AuthorExtractor
acct = "#{username}@#{domain}"
end
FollowRemoteAccountService.new.call(acct, update_profile)
ResolveRemoteAccountService.new.call(acct, update_profile)
end
end

View file

@ -7,7 +7,7 @@ class FollowService < BaseService
# @param [Account] source_account From which to follow
# @param [String] uri User URI to follow in the form of username@domain
def call(source_account, uri)
target_account = FollowRemoteAccountService.new.call(uri)
target_account = ResolveRemoteAccountService.new.call(uri)
raise ActiveRecord::RecordNotFound if target_account.nil? || target_account.id == source_account.id || target_account.suspended?
raise Mastodon::NotPermittedError if target_account.blocking?(source_account) || source_account.blocking?(target_account)

View file

@ -41,6 +41,6 @@ class ProcessMentionsService < BaseService
private
def follow_remote_account_service
@follow_remote_account_service ||= FollowRemoteAccountService.new
@follow_remote_account_service ||= ResolveRemoteAccountService.new
end
end

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
class FollowRemoteAccountService < BaseService
class ResolveRemoteAccountService < BaseService
include OStatus2::MagicKey
include HttpHelper