diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2016-09-17 17:07:45 +0200 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2016-09-17 17:07:45 +0200 |
commit | 183a23943bba2c214c56bf43c706f3f34d9bde32 (patch) | |
tree | 1d9061cd8ff434ccbe96835ee011df8d0b6df12c /app/services | |
parent | 0e9c1a297aa15570d87da356f2ac908f1fd433a3 (diff) |
Fix how other services used old FollowRemoteAccountService
Diffstat (limited to 'app/services')
-rw-r--r-- | app/services/process_feed_service.rb | 3 | ||||
-rw-r--r-- | app/services/process_interaction_service.rb | 3 | ||||
-rw-r--r-- | app/services/process_mentions_service.rb | 5 |
3 files changed, 8 insertions, 3 deletions
diff --git a/app/services/process_feed_service.rb b/app/services/process_feed_service.rb index ba7558e1f..e0b857482 100644 --- a/app/services/process_feed_service.rb +++ b/app/services/process_feed_service.rb @@ -127,10 +127,11 @@ class ProcessFeedService < BaseService if account.nil? account = follow_remote_account_service.("#{username}@#{domain}", false) - return nil if account.nil? end Status.new(account: account, uri: target_id(xml), text: target_content(xml), url: target_url(xml)) + rescue Goldfinger::Error, HTTP::Error + nil end def published(xml) diff --git a/app/services/process_interaction_service.rb b/app/services/process_interaction_service.rb index d9fcf9032..3266f73e3 100644 --- a/app/services/process_interaction_service.rb +++ b/app/services/process_interaction_service.rb @@ -15,7 +15,6 @@ class ProcessInteractionService < BaseService if account.nil? account = follow_remote_account_service.("#{username}@#{domain}", false) - return if account.nil? end if salmon.verify(envelope, account.keypair) @@ -36,6 +35,8 @@ class ProcessInteractionService < BaseService delete_post!(xml, account) end end + rescue Goldfinger::Error, HTTP::Error + nil end private diff --git a/app/services/process_mentions_service.rb b/app/services/process_mentions_service.rb index fb605326d..04171cecb 100644 --- a/app/services/process_mentions_service.rb +++ b/app/services/process_mentions_service.rb @@ -11,7 +11,10 @@ class ProcessMentionsService < BaseService mentioned_account = Account.find_remote(username, domain) if mentioned_account.nil? && !domain.nil? - mentioned_account = follow_remote_account_service.("#{match.first}") + begin + mentioned_account = follow_remote_account_service.("#{match.first}") + rescue Goldfinger::Error, HTTP::Error + end end next if mentioned_account.nil? |