Change reblogs counter to be updated when boosted privately (#10964)

This commit is contained in:
Eugen Rochko 2019-06-04 23:11:44 +02:00 committed by GitHub
parent f2b743e715
commit 6a9a759f40
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -499,7 +499,7 @@ class Status < ApplicationRecord
return if direct_visibility? return if direct_visibility?
account&.increment_count!(:statuses_count) account&.increment_count!(:statuses_count)
reblog&.increment_count!(:reblogs_count) if reblog? && (public_visibility? || unlisted_visibility?) reblog&.increment_count!(:reblogs_count) if reblog?
thread&.increment_count!(:replies_count) if in_reply_to_id.present? && (public_visibility? || unlisted_visibility?) thread&.increment_count!(:replies_count) if in_reply_to_id.present? && (public_visibility? || unlisted_visibility?)
end end
@ -507,7 +507,7 @@ class Status < ApplicationRecord
return if direct_visibility? || marked_for_mass_destruction? return if direct_visibility? || marked_for_mass_destruction?
account&.decrement_count!(:statuses_count) account&.decrement_count!(:statuses_count)
reblog&.decrement_count!(:reblogs_count) if reblog? && (public_visibility? || unlisted_visibility?) reblog&.decrement_count!(:reblogs_count) if reblog?
thread&.decrement_count!(:replies_count) if in_reply_to_id.present? && (public_visibility? || unlisted_visibility?) thread&.decrement_count!(:replies_count) if in_reply_to_id.present? && (public_visibility? || unlisted_visibility?)
end end