about summary refs log tree commit diff
path: root/app
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2017-06-19 01:51:04 +0200
committerGitHub <noreply@github.com>2017-06-19 01:51:04 +0200
commitf3be6052867343ab15cc84bc91edcaf0c1d70115 (patch)
tree2bddc48a4cf35a0684c74b22a0f78f7031b8a4b2 /app
parentaebebdc5d1967e2110a9caafc3238c8b8ec055c4 (diff)
Rename FollowRemoteAccountService to ResolveRemoteAccountService (#3847)
Rename Activitypub to ActivityPub
Diffstat (limited to 'app')
-rw-r--r--app/controllers/api/activitypub/activities_controller.rb2
-rw-r--r--app/controllers/api/activitypub/notes_controller.rb2
-rw-r--r--app/controllers/api/activitypub/outbox_controller.rb2
-rw-r--r--app/controllers/authorize_follows_controller.rb2
-rw-r--r--app/services/account_search_service.rb2
-rw-r--r--app/services/concerns/author_extractor.rb2
-rw-r--r--app/services/follow_service.rb2
-rw-r--r--app/services/process_mentions_service.rb2
-rw-r--r--app/services/resolve_remote_account_service.rb (renamed from app/services/follow_remote_account_service.rb)2
-rw-r--r--app/views/activitypub/types/collection.activitystreams2.rabl2
-rw-r--r--app/views/activitypub/types/ordered_collection_page.activitystreams2.rabl2
-rw-r--r--app/workers/import_worker.rb4
12 files changed, 13 insertions, 13 deletions
diff --git a/app/controllers/api/activitypub/activities_controller.rb b/app/controllers/api/activitypub/activities_controller.rb
index 740c8589a..a880ee92f 100644
--- a/app/controllers/api/activitypub/activities_controller.rb
+++ b/app/controllers/api/activitypub/activities_controller.rb
@@ -1,6 +1,6 @@
 # frozen_string_literal: true
 
-class Api::Activitypub::ActivitiesController < Api::BaseController
+class Api::ActivityPub::ActivitiesController < Api::BaseController
   include Authorization
 
   # before_action :set_follow, only: [:show_follow]
diff --git a/app/controllers/api/activitypub/notes_controller.rb b/app/controllers/api/activitypub/notes_controller.rb
index 783c1c4ed..96652b879 100644
--- a/app/controllers/api/activitypub/notes_controller.rb
+++ b/app/controllers/api/activitypub/notes_controller.rb
@@ -1,6 +1,6 @@
 # frozen_string_literal: true
 
-class Api::Activitypub::NotesController < Api::BaseController
+class Api::ActivityPub::NotesController < Api::BaseController
   include Authorization
 
   before_action :set_status
diff --git a/app/controllers/api/activitypub/outbox_controller.rb b/app/controllers/api/activitypub/outbox_controller.rb
index 0738d7dee..1af04cb54 100644
--- a/app/controllers/api/activitypub/outbox_controller.rb
+++ b/app/controllers/api/activitypub/outbox_controller.rb
@@ -1,6 +1,6 @@
 # frozen_string_literal: true
 
-class Api::Activitypub::OutboxController < Api::BaseController
+class Api::ActivityPub::OutboxController < Api::BaseController
   before_action :set_account
 
   respond_to :activitystreams2
diff --git a/app/controllers/authorize_follows_controller.rb b/app/controllers/authorize_follows_controller.rb
index b15883d58..da4ef022a 100644
--- a/app/controllers/authorize_follows_controller.rb
+++ b/app/controllers/authorize_follows_controller.rb
@@ -40,7 +40,7 @@ class AuthorizeFollowsController < ApplicationController
   end
 
   def account_from_remote_follow
-    FollowRemoteAccountService.new.call(acct_without_prefix)
+    ResolveRemoteAccountService.new.call(acct_without_prefix)
   end
 
   def acct_param_is_url?
diff --git a/app/services/account_search_service.rb b/app/services/account_search_service.rb
index 2b77ad7c6..c266494f0 100644
--- a/app/services/account_search_service.rb
+++ b/app/services/account_search_service.rb
@@ -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
diff --git a/app/services/concerns/author_extractor.rb b/app/services/concerns/author_extractor.rb
index ae32eebbb..00fe1c663 100644
--- a/app/services/concerns/author_extractor.rb
+++ b/app/services/concerns/author_extractor.rb
@@ -18,6 +18,6 @@ module AuthorExtractor
       acct   = "#{username}@#{domain}"
     end
 
-    FollowRemoteAccountService.new.call(acct, update_profile)
+    ResolveRemoteAccountService.new.call(acct, update_profile)
   end
 end
diff --git a/app/services/follow_service.rb b/app/services/follow_service.rb
index 4de75e98d..e54ff7d0f 100644
--- a/app/services/follow_service.rb
+++ b/app/services/follow_service.rb
@@ -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)
diff --git a/app/services/process_mentions_service.rb b/app/services/process_mentions_service.rb
index aa0a4d71b..438033d22 100644
--- a/app/services/process_mentions_service.rb
+++ b/app/services/process_mentions_service.rb
@@ -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
diff --git a/app/services/follow_remote_account_service.rb b/app/services/resolve_remote_account_service.rb
index 30ba7bc75..362d0df98 100644
--- a/app/services/follow_remote_account_service.rb
+++ b/app/services/resolve_remote_account_service.rb
@@ -1,6 +1,6 @@
 # frozen_string_literal: true
 
-class FollowRemoteAccountService < BaseService
+class ResolveRemoteAccountService < BaseService
   include OStatus2::MagicKey
   include HttpHelper
 
diff --git a/app/views/activitypub/types/collection.activitystreams2.rabl b/app/views/activitypub/types/collection.activitystreams2.rabl
index d3f8ddcac..cc0e532b7 100644
--- a/app/views/activitypub/types/collection.activitystreams2.rabl
+++ b/app/views/activitypub/types/collection.activitystreams2.rabl
@@ -1,3 +1,3 @@
 extends 'activitypub/intransient.activitystreams2.rabl'
 
-node(:type)       { 'Collection' }
+node(:type) { 'Collection' }
diff --git a/app/views/activitypub/types/ordered_collection_page.activitystreams2.rabl b/app/views/activitypub/types/ordered_collection_page.activitystreams2.rabl
index c821fa928..9937d11e9 100644
--- a/app/views/activitypub/types/ordered_collection_page.activitystreams2.rabl
+++ b/app/views/activitypub/types/ordered_collection_page.activitystreams2.rabl
@@ -1,3 +1,3 @@
 extends 'activitypub/types/ordered_collection.activitystreams2.rabl'
 
-node(:type)     { 'OrderedCollectionPage' }
+node(:type) { 'OrderedCollectionPage' }
diff --git a/app/workers/import_worker.rb b/app/workers/import_worker.rb
index e93fa33cf..90a226206 100644
--- a/app/workers/import_worker.rb
+++ b/app/workers/import_worker.rb
@@ -41,7 +41,7 @@ class ImportWorker
   def process_mutes
     import_rows.each do |row|
       begin
-        target_account = FollowRemoteAccountService.new.call(row.first)
+        target_account = ResolveRemoteAccountService.new.call(row.first)
         next if target_account.nil?
         MuteService.new.call(from_account, target_account)
       rescue Goldfinger::Error, HTTP::Error, OpenSSL::SSL::SSLError
@@ -53,7 +53,7 @@ class ImportWorker
   def process_blocks
     import_rows.each do |row|
       begin
-        target_account = FollowRemoteAccountService.new.call(row.first)
+        target_account = ResolveRemoteAccountService.new.call(row.first)
         next if target_account.nil?
         BlockService.new.call(from_account, target_account)
       rescue Goldfinger::Error, HTTP::Error, OpenSSL::SSL::SSLError