mirror of
https://github.com/mastodon/mastodon.git
synced 2024-12-23 01:41:04 +01:00
Add warnings to report action logs (#27425)
This commit is contained in:
parent
44edf3aa91
commit
8b770ce811
1 changed files with 5 additions and 0 deletions
|
@ -142,6 +142,11 @@ class Report < ApplicationRecord
|
||||||
target_type: 'Status',
|
target_type: 'Status',
|
||||||
target_id: status_ids
|
target_id: status_ids
|
||||||
).unscope(:order).arel,
|
).unscope(:order).arel,
|
||||||
|
|
||||||
|
Admin::ActionLog.where(
|
||||||
|
target_type: 'AccountWarning',
|
||||||
|
target_id: AccountWarning.where(report_id: id).select(:id)
|
||||||
|
).unscope(:order).arel,
|
||||||
].reduce { |union, query| Arel::Nodes::UnionAll.new(union, query) }
|
].reduce { |union, query| Arel::Nodes::UnionAll.new(union, query) }
|
||||||
|
|
||||||
Admin::ActionLog.from(Arel::Nodes::As.new(subquery, Admin::ActionLog.arel_table))
|
Admin::ActionLog.from(Arel::Nodes::As.new(subquery, Admin::ActionLog.arel_table))
|
||||||
|
|
Loading…
Reference in a new issue