Merge commit 'fac734b6a8' into kb_migration

This commit is contained in:
KMY 2023-04-13 18:57:03 +09:00
commit 5a661415e2
22 changed files with 121 additions and 14 deletions

View file

@ -28,6 +28,7 @@
# trendable :boolean
# ordered_media_attachment_ids :bigint(8) is an Array
# searchability :integer
# markdown :boolean default(FALSE)
#
require 'ostruct'
@ -310,6 +311,10 @@ class Status < ApplicationRecord
status_stat&.favourites_count || 0
end
def emoji_reactions_count
status_stat&.emoji_reactions_count || 0
end
def increment_count!(key)
update_status_stat!(key => public_send(key) + 1)
end