1
0
Fork 0
forked from gitea/nas

Merge branch 'kb-draft-7.0' into kb_development

This commit is contained in:
KMY 2023-10-08 18:59:30 +09:00
commit 5b21964bda
8 changed files with 58 additions and 6 deletions

View file

@ -11,6 +11,15 @@ module StatusThreadingConcern
find_statuses_from_tree_path(descendant_ids(limit, depth), account, promote: true)
end
def readable_references(account = nil)
statuses = references.to_a
account_ids = statuses.map(&:account_id).uniq
domains = statuses.filter_map(&:account_domain).uniq
relations = account&.relations_map(account_ids, domains) || {}
statuses.reject! { |status| StatusFilter.new(status, account, relations).filtered? }
statuses
end
def self_replies(limit)
account.statuses.where(in_reply_to_id: id, visibility: [:public, :unlisted, :public_unlisted, :login]).reorder(id: :asc).limit(limit)
end