about summary refs log tree commit diff
path: root/app/models
diff options
context:
space:
mode:
authorFire Demon <firedemon@creature.cafe>2020-10-13 12:06:57 -0500
committerFire Demon <firedemon@creature.cafe>2020-10-13 12:06:57 -0500
commit0e6cb59f2f51ad6831188b47fd9e5c6827e9ff91 (patch)
treed28bca33f9db0ea3b452af9897f58636872e6a8e /app/models
parentcfe6fc359ac985b8a464909463ff0bf1364560e4 (diff)
Add missing safe navigation operator
Diffstat (limited to 'app/models')
-rw-r--r--app/models/status.rb2
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