1
0
mirror of https://github.com/mastodon/mastodon synced 2024-11-28 06:48:28 +09:00

Instantiate service classes for each call (fixes #5540) (#5543)

This commit is contained in:
ThibG 2017-10-27 19:08:30 +02:00 committed by Eugen Rochko
parent e843f62f47
commit 89c77fe225
2 changed files with 5 additions and 5 deletions

View File

@ -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

View File

@ -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