Add emoji reaction deletion api

This commit is contained in:
KMY 2023-02-25 10:42:19 +09:00
parent 5f7da7bff1
commit 15bc0df759
14 changed files with 142 additions and 45 deletions

View file

@ -369,6 +369,10 @@ class Status < ApplicationRecord
StatusPin.select('status_id').where(status_id: status_ids).where(account_id: account_id).each_with_object({}) { |p, h| h[p.status_id] = true }
end
def emoji_reactions_map(status_ids, account_id)
EmojiReaction.select('status_id').where(status_id: status_ids).where(account_id: account_id).each_with_object({}) { |e, h| h[e.status_id] = true }
end
def reload_stale_associations!(cached_items)
account_ids = []