You've already forked AstralRinth
forked from didirus/AstralRinth
Custom Emails (#4526)
* Dynamic email template * Set lower cache expiry for templates * Custom email route * Fix subject line on custom emails * chore: query cache, clippy, fmt * Bugfixes * Key-based caching on custom emails * Sequentially process emails prone to causing cache stampede * Fill variables in dynamic body + subject line * Update apps/labrinth/src/queue/email/templates.rs Co-authored-by: aecsocket <aecsocket@tutanota.com> Signed-off-by: François-Xavier Talbot <108630700+fetchfern@users.noreply.github.com> * Update apps/labrinth/src/queue/email/templates.rs Co-authored-by: aecsocket <aecsocket@tutanota.com> Signed-off-by: François-Xavier Talbot <108630700+fetchfern@users.noreply.github.com> --------- Signed-off-by: François-Xavier Talbot <108630700+fetchfern@users.noreply.github.com> Co-authored-by: aecsocket <aecsocket@tutanota.com>
This commit is contained in:
committed by
GitHub
parent
aec49cff7c
commit
0c66fa3f12
@@ -139,6 +139,11 @@ pub enum LegacyNotificationBody {
|
||||
amount: u64,
|
||||
date_available: DateTime<Utc>,
|
||||
},
|
||||
Custom {
|
||||
key: String,
|
||||
title: String,
|
||||
body_md: String,
|
||||
},
|
||||
Unknown,
|
||||
}
|
||||
|
||||
@@ -217,6 +222,7 @@ impl LegacyNotification {
|
||||
NotificationBody::PayoutAvailable { .. } => {
|
||||
Some("payout_available".to_string())
|
||||
}
|
||||
NotificationBody::Custom { .. } => Some("custom".to_string()),
|
||||
NotificationBody::LegacyMarkdown {
|
||||
notification_type, ..
|
||||
} => notification_type.clone(),
|
||||
@@ -378,6 +384,15 @@ impl LegacyNotification {
|
||||
service,
|
||||
currency,
|
||||
},
|
||||
NotificationBody::Custom {
|
||||
title,
|
||||
body_md,
|
||||
key,
|
||||
} => LegacyNotificationBody::Custom {
|
||||
title,
|
||||
body_md,
|
||||
key,
|
||||
},
|
||||
NotificationBody::PaymentFailed { amount, service } => {
|
||||
LegacyNotificationBody::PaymentFailed { amount, service }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user