main ← fix/staff-coloured-posts-email-notifications
opened 10:26AM - 11 Feb 26 UTC
When a staff member applies "Staff Colour" to a post, it changes `post_type` fro…m `regular` (1) to `moderator_action` (2). The `NotificationEmailer` only sent emails for `regular` and `whisper` post types, so staff-coloured posts silently skipped email delivery. The same issue affected `PostAlerter`'s `@here` mention expansion which also filtered on post type.
This is safe to fix because the only two places that needed updating are `NotificationEmailer::EMAILABLE_POST_TYPES` and
`PostAlerter#expand_here_mention`. System-generated moderator posts (close/split/merge) never reach this code — `PostJobsEnqueuer` skips them via `skip_after_create?`, so they never generate the notification types that flow through `NotificationEmailer`. Similarly, system moderator posts don't contain `@here` mentions, so adding `moderator_action` to `expand_here_mention` is equally safe.
https://meta.discourse.org/t/370857