about summary refs log tree commit diff
path: root/app/models
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2019-01-18 15:56:21 +0100
committerGitHub <noreply@github.com>2019-01-18 15:56:21 +0100
commit31f396b57dea684685d0affc3727a75eed2f38c9 (patch)
tree1dfca58ceb8e8ac748b91476a3fd6fd700624024 /app/models
parent55219f11cce89881569a1af1b7651537bb6fe023 (diff)
Add support for non-public reblogs from ActivityPub (#9841)
Fix #9838
Diffstat (limited to 'app/models')
-rw-r--r--app/models/status.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/status.rb b/app/models/status.rb
index 0705ba4c1..035423b40 100644
--- a/app/models/status.rb
+++ b/app/models/status.rb
@@ -478,7 +478,7 @@ class Status < ApplicationRecord
     return if direct_visibility?
 
     account&.increment_count!(:statuses_count)
-    reblog&.increment_count!(:reblogs_count) if reblog?
+    reblog&.increment_count!(:reblogs_count) if reblog? && (public_visibility? || unlisted_visibility?)
     thread&.increment_count!(:replies_count) if in_reply_to_id.present? && (public_visibility? || unlisted_visibility?)
   end
 
@@ -486,7 +486,7 @@ class Status < ApplicationRecord
     return if direct_visibility? || marked_for_mass_destruction?
 
     account&.decrement_count!(:statuses_count)
-    reblog&.decrement_count!(:reblogs_count) if reblog?
+    reblog&.decrement_count!(:reblogs_count) if reblog? && (public_visibility? || unlisted_visibility?)
     thread&.decrement_count!(:replies_count) if in_reply_to_id.present? && (public_visibility? || unlisted_visibility?)
   end