diff options
author | Fire Demon <firedemon@creature.cafe> | 2020-10-13 12:06:57 -0500 |
---|---|---|
committer | Fire Demon <firedemon@creature.cafe> | 2020-10-13 12:06:57 -0500 |
commit | 0e6cb59f2f51ad6831188b47fd9e5c6827e9ff91 (patch) | |
tree | d28bca33f9db0ea3b452af9897f58636872e6a8e | |
parent | cfe6fc359ac985b8a464909463ff0bf1364560e4 (diff) |
Add missing safe navigation operator
-rw-r--r-- | app/models/status.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/status.rb b/app/models/status.rb index 7f4066036..50a558ed1 100644 --- a/app/models/status.rb +++ b/app/models/status.rb @@ -573,7 +573,7 @@ class Status < ApplicationRecord end if target_account.id != account&.id && target_account&.user&.max_history_public.present? - history_limit = account.following?(target_account) ? target_account.user.max_history_private : target_account.user.max_history_public + history_limit = account&.following?(target_account) ? target_account.user.max_history_private : target_account.user.max_history_public query = query.where('statuses.updated_at >= ?', history_limit.weeks.ago) if history_limit.positive? end |