diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2017-02-12 17:28:15 +0100 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2017-02-12 17:30:15 +0100 |
commit | 720ff55262fec0abc630a613a4f3564b98b689dc (patch) | |
tree | 75a93b493dcec4cacd62f0ffcb55ad43891855c4 /app/workers | |
parent | 446267d1bfaba0f596544186361553118615e942 (diff) |
Adding more unit tests. Fixing Salmon slaps XML
Diffstat (limited to 'app/workers')
-rw-r--r-- | app/workers/after_remote_follow_request_worker.rb | 2 | ||||
-rw-r--r-- | app/workers/after_remote_follow_worker.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/app/workers/after_remote_follow_request_worker.rb b/app/workers/after_remote_follow_request_worker.rb index ad94d2769..f1d6869cc 100644 --- a/app/workers/after_remote_follow_request_worker.rb +++ b/app/workers/after_remote_follow_request_worker.rb @@ -9,7 +9,7 @@ class AfterRemoteFollowRequestWorker follow_request = FollowRequest.find(follow_request_id) updated_account = FetchRemoteAccountService.new.call(follow_request.target_account.remote_url) - return if updated_account.locked? + return if updated_account.nil? || updated_account.locked? follow_request.destroy FollowService.new.call(follow_request.account, updated_account.acct) diff --git a/app/workers/after_remote_follow_worker.rb b/app/workers/after_remote_follow_worker.rb index 496aaf73e..0d04456a9 100644 --- a/app/workers/after_remote_follow_worker.rb +++ b/app/workers/after_remote_follow_worker.rb @@ -9,7 +9,7 @@ class AfterRemoteFollowWorker follow = Follow.find(follow_id) updated_account = FetchRemoteAccountService.new.call(follow.target_account.remote_url) - return unless updated_account.locked? + return if updated_account.nil? || !updated_account.locked? follow.destroy FollowService.new.call(follow.account, updated_account.acct) |