about summary refs log tree commit diff
path: root/app
diff options
context:
space:
mode:
authorThibG <thib@sitedethib.com>2017-10-27 19:08:30 +0200
committerEugen Rochko <eugen@zeonfederated.com>2017-10-27 19:08:30 +0200
commit89c77fe225a7550e19d0631ce2172fd2b49a605a (patch)
treecc0fa98f8dd110ef7dc85bd13b28ce2678c8d62f /app
parente843f62f479d9b8b2d177e587c3e10b5e3945f68 (diff)
Instantiate service classes for each call (fixes #5540) (#5543)
Diffstat (limited to 'app')
-rw-r--r--app/services/post_status_service.rb4
-rw-r--r--app/services/process_mentions_service.rb6
2 files changed, 5 insertions, 5 deletions
diff --git a/app/services/post_status_service.rb b/app/services/post_status_service.rb
index e37cd94df..de350f8e6 100644
--- a/app/services/post_status_service.rb
+++ b/app/services/post_status_service.rb
@@ -70,11 +70,11 @@ class PostStatusService < BaseService
   end
 
   def process_mentions_service
-    @process_mentions_service ||= ProcessMentionsService.new
+    ProcessMentionsService.new
   end
 
   def process_hashtags_service
-    @process_hashtags_service ||= ProcessHashtagsService.new
+    ProcessHashtagsService.new
   end
 
   def redis
diff --git a/app/services/process_mentions_service.rb b/app/services/process_mentions_service.rb
index 1c3eea369..1fd2ece1c 100644
--- a/app/services/process_mentions_service.rb
+++ b/app/services/process_mentions_service.rb
@@ -16,7 +16,7 @@ class ProcessMentionsService < BaseService
 
       if mentioned_account.nil? && !domain.nil?
         begin
-          mentioned_account = follow_remote_account_service.call(match.first.to_s)
+          mentioned_account = resolve_remote_account_service.call(match.first.to_s)
         rescue Goldfinger::Error, HTTP::Error
           mentioned_account = nil
         end
@@ -54,7 +54,7 @@ class ProcessMentionsService < BaseService
     ).as_json).sign!(status.account))
   end
 
-  def follow_remote_account_service
-    @follow_remote_account_service ||= ResolveRemoteAccountService.new
+  def resolve_remote_account_service
+    ResolveRemoteAccountService.new
   end
 end