Skip to content

Commit

Permalink
Add warnings to report action logs (mastodon#27425)
Browse files Browse the repository at this point in the history
  • Loading branch information
ClearlyClaire authored Oct 23, 2023
1 parent 44edf3a commit 8b770ce
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app/models/report.rb
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,11 @@ def history
target_type: 'Status',
target_id: status_ids
).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) }

Admin::ActionLog.from(Arel::Nodes::As.new(subquery, Admin::ActionLog.arel_table))
Expand Down

0 comments on commit 8b770ce

Please sign in to comment.