Skip to content
Snippets Groups Projects
Commit 6b2be5db authored by James's avatar James Committed by Eugen Rochko
Browse files

Guarantee Subscription service first account has proper URL details (#4732)

* Guarantee Subscription service first account has proper URL details

Subscription Service potentially could break if the first user suspended
themselves, creating a situation where the urls that populate throughout
subscription service's PuSH request would cause the remote API to throw 503 errors.

Guaranteeing that the first account picked is not suspended prevents this problem.

* Fix style issue
parent 69957ed1
No related branches found
No related tags found
No related merge requests found
......@@ -42,7 +42,7 @@ class SubscribeService < BaseService
end
def some_local_account
@some_local_account ||= Account.local.first
@some_local_account ||= Account.local.where(suspended: false).first
end
# Any response in the 3xx or 4xx range, except for 429 (rate limit)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment