discourse/app/mailers
Selase Krakani 467fcb460a
FIX: Missing/incorrect flag reason in account_deleted emails (#34955)
`UserNotifications#account_deleted` builds a localized flag reason from
the reviewable’s first `reviewable_score` (falling back to `spam` if
none is found).

Currently, some score types (e.g. `needs_approval`) are not covered. In
cases where a "Needs Approval" flag led to an account deletion, the
lookup key could end up as `flag_reasons.`, causing the entire
`flag_reasons`
 section to be rendered instead of a single entry.

This change adds support for additional score types (like
`needs_approval`). If no translation exists (e.g. custom flags), the
flag’s description will be used if available, before falling back to the
default `spam` reason.

More context:
https://meta.discourse.org/t/ruby-hash-syntax-being-displayed-in-emails-sent-to-deleted-users/382411
2025-11-17 15:22:22 +00:00
..
admin_confirmation_mailer.rb DEV: Apply syntax_tree formatting to app/* 2023-01-09 14:14:59 +00:00
download_backup_mailer.rb DEV: Apply syntax_tree formatting to app/* 2023-01-09 14:14:59 +00:00
group_smtp_mailer.rb UX: Use a dropdown for SSL mode for group SMTP (#27932) 2024-07-18 10:33:14 +10:00
invite_mailer.rb UX: add modifier to customize invite template (#35458) 2025-10-27 11:58:58 -04:00
rejection_mailer.rb DEV: Apply syntax_tree formatting to app/* 2023-01-09 14:14:59 +00:00
subscription_mailer.rb DEV: Apply syntax_tree formatting to app/* 2023-01-09 14:14:59 +00:00
test_mailer.rb DEV: Apply syntax_tree formatting to app/* 2023-01-09 14:14:59 +00:00
user_notifications.rb FIX: Missing/incorrect flag reason in account_deleted emails (#34955) 2025-11-17 15:22:22 +00:00
version_mailer.rb DEV: Apply syntax_tree formatting to app/* 2023-01-09 14:14:59 +00:00