1
0
Fork 0
forked from gitea/nas

Merge branch 'kb_development' into kb_migration

This commit is contained in:
KMY 2023-04-25 10:32:16 +09:00
commit 9b032185b8
59 changed files with 1441 additions and 28 deletions

View file

@ -291,14 +291,6 @@ class Status < ApplicationRecord
end
end
def ordered_media_attachments_original_mastodon
ordered_media_attachments.take(4)
end
def ordered_media_attachments_extra
ordered_media_attachments.drop(4).take(4)
end
def replies_count
status_stat&.replies_count || 0
end
@ -380,6 +372,11 @@ class Status < ApplicationRecord
'private'
end
def compute_searchability_activitypub
return 'unlisted' if public_unlisted_visibility? && public_searchability?
compute_searchability
end
after_create_commit :increment_counter_caches
after_destroy_commit :decrement_counter_caches