feat(mail-ingest): tell every address holder once when the import stops

A plan without the import switches it off from outside the server, and an
admin can switch it off too; the plan promises a "mail import paused" note.
An hourly job sends mail_ingest_paused to each holder of a live address with
their own import on, notes the pause first, and forgets it once it is back.
This commit is contained in:
Maurice
2026-11-13 17:11:30 +01:00
parent 1d052f725f
commit 44f669cd0e
72 changed files with 429 additions and 3 deletions
@@ -111,6 +111,10 @@ const uk: NotificationLocale = {
title: 'Переслані бронювання для перевірки',
body: `Пересланих бронювань чекає на вас у TREK: ${p.count}. Біля кожного вказано, чому його не додано автоматично.`,
}),
mail_ingest_paused: () => ({
title: 'Імпорт листів призупинено',
body: 'TREK поки що не приймає переслані листи з бронюваннями, тож поки не пересилайте їх. Ваші адреси зберігаються й знову працюватимуть, коли імпорт повернеться, а вже додані бронювання залишаються у ваших подорожах.',
}),
plugin_notification: (p) => ({ title: p.title ?? '', body: p.body ?? '' }),
},
passwordReset: {
+2
View File
@@ -62,6 +62,8 @@ const notif: TranslationStrings = {
'notif.mail_booking_added.shared': '{actor} додав(ла) {booking} до {trip} з пересланого листа',
'notif.mail_booking_pending.title': 'Переслані бронювання для перевірки',
'notif.mail_booking_pending.text': 'Пересланих бронювань чекає на вас: {count}',
'notif.mail_ingest_paused.title': 'Імпорт листів призупинено',
'notif.mail_ingest_paused.text': 'Переслані листи з бронюваннями поки що не приймаються. Ваші адреси зберігаються й знову працюватимуть, коли імпорт повернеться.',
'notif.action.undo': 'Скасувати',
'notif.action.keep': 'Залишити',
'notif.action.review': 'Перевірити',