Skip to content

Commit 03bbc74

Browse files
authored
Change reblogs counter to be updated when boosted privately (mastodon#10964)
1 parent 3f20f7b commit 03bbc74

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

app/models/status.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -499,15 +499,15 @@ def increment_counter_caches
499499
return if direct_visibility?
500500

501501
account&.increment_count!(:statuses_count)
502-
reblog&.increment_count!(:reblogs_count) if reblog? && (public_visibility? || unlisted_visibility?)
502+
reblog&.increment_count!(:reblogs_count) if reblog?
503503
thread&.increment_count!(:replies_count) if in_reply_to_id.present? && (public_visibility? || unlisted_visibility?)
504504
end
505505

506506
def decrement_counter_caches
507507
return if direct_visibility? || marked_for_mass_destruction?
508508

509509
account&.decrement_count!(:statuses_count)
510-
reblog&.decrement_count!(:reblogs_count) if reblog? && (public_visibility? || unlisted_visibility?)
510+
reblog&.decrement_count!(:reblogs_count) if reblog?
511511
thread&.decrement_count!(:replies_count) if in_reply_to_id.present? && (public_visibility? || unlisted_visibility?)
512512
end
513513

0 commit comments

Comments
 (0)