forked from fedi/mastodon
Fix how other services used old FollowRemoteAccountService
This commit is contained in:
parent
0e9c1a297a
commit
183a23943b
|
@ -127,10 +127,11 @@ class ProcessFeedService < BaseService
|
||||||
|
|
||||||
if account.nil?
|
if account.nil?
|
||||||
account = follow_remote_account_service.("#{username}@#{domain}", false)
|
account = follow_remote_account_service.("#{username}@#{domain}", false)
|
||||||
return nil if account.nil?
|
|
||||||
end
|
end
|
||||||
|
|
||||||
Status.new(account: account, uri: target_id(xml), text: target_content(xml), url: target_url(xml))
|
Status.new(account: account, uri: target_id(xml), text: target_content(xml), url: target_url(xml))
|
||||||
|
rescue Goldfinger::Error, HTTP::Error
|
||||||
|
nil
|
||||||
end
|
end
|
||||||
|
|
||||||
def published(xml)
|
def published(xml)
|
||||||
|
|
|
@ -15,7 +15,6 @@ class ProcessInteractionService < BaseService
|
||||||
|
|
||||||
if account.nil?
|
if account.nil?
|
||||||
account = follow_remote_account_service.("#{username}@#{domain}", false)
|
account = follow_remote_account_service.("#{username}@#{domain}", false)
|
||||||
return if account.nil?
|
|
||||||
end
|
end
|
||||||
|
|
||||||
if salmon.verify(envelope, account.keypair)
|
if salmon.verify(envelope, account.keypair)
|
||||||
|
@ -36,6 +35,8 @@ class ProcessInteractionService < BaseService
|
||||||
delete_post!(xml, account)
|
delete_post!(xml, account)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
rescue Goldfinger::Error, HTTP::Error
|
||||||
|
nil
|
||||||
end
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
|
@ -11,7 +11,10 @@ class ProcessMentionsService < BaseService
|
||||||
mentioned_account = Account.find_remote(username, domain)
|
mentioned_account = Account.find_remote(username, domain)
|
||||||
|
|
||||||
if mentioned_account.nil? && !domain.nil?
|
if mentioned_account.nil? && !domain.nil?
|
||||||
|
begin
|
||||||
mentioned_account = follow_remote_account_service.("#{match.first}")
|
mentioned_account = follow_remote_account_service.("#{match.first}")
|
||||||
|
rescue Goldfinger::Error, HTTP::Error
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
next if mentioned_account.nil?
|
next if mentioned_account.nil?
|
||||||
|
|
Loading…
Reference in a new issue