post events: show post-related mod actions on post event page.

Show the following actions on the post events page:

* Post bans and unbans
* Post deletions and undeletions
* Thumbnail regenerations and IQDB regenerations
* Favorites moves
* Rating locks and unlocks
* Note locks and unlocks

Fixes #3825: Events/Moderation page for each post should show eventual ban actions
This commit is contained in:
evazion
2022-09-26 03:24:50 -05:00
parent 75a2814f18
commit 67c992bfbf
8 changed files with 138 additions and 7 deletions

View File

@@ -1513,7 +1513,16 @@ UNION ALL
post_replacements.post_id,
post_replacements.creator_id,
post_replacements.created_at AS event_at
FROM public.post_replacements;
FROM public.post_replacements
UNION ALL
( SELECT 'ModAction'::character varying AS model_type,
mod_actions.id AS model_id,
mod_actions.subject_id AS post_id,
mod_actions.creator_id,
mod_actions.created_at AS event_at
FROM public.mod_actions
WHERE ((mod_actions.subject_type)::text = 'Post'::text)
ORDER BY mod_actions.created_at DESC);
--
@@ -6739,6 +6748,7 @@ INSERT INTO "schema_migrations" (version) VALUES
('20220922014326'),
('20220923010905'),
('20220924092056'),
('20220925045236');
('20220925045236'),
('20220926050108');