diff --git a/plugins/notifications-backend-module-email/README.md b/plugins/notifications-backend-module-email/README.md index f87ce8c18e..1bdfd59c01 100644 --- a/plugins/notifications-backend-module-email/README.md +++ b/plugins/notifications-backend-module-email/README.md @@ -20,7 +20,9 @@ notifications: sender: 'sender@mycompany.com' replyTo: 'no-reply@mycompany.com' broadcastConfig: - receiver: 'user' + receiver: 'users' + cache: + ttl: 60000 ``` See `config.d.ts` for more options for configuration. diff --git a/plugins/notifications-backend-module-email/config.d.ts b/plugins/notifications-backend-module-email/config.d.ts index 3d85022193..ec92bb8813 100644 --- a/plugins/notifications-backend-module-email/config.d.ts +++ b/plugins/notifications-backend-module-email/config.d.ts @@ -105,10 +105,12 @@ export interface Config { */ receiverEmails?: string[]; }; - /** - * Email cache TTL, defaults to 1 hour - */ - cacheTtl?: number; + cache?: { + /** + * Email cache TTL, defaults to 1 hour + */ + ttl?: number; + }; }; }; }; diff --git a/plugins/notifications-backend-module-email/src/processor/NotificationsEmailProcessor.ts b/plugins/notifications-backend-module-email/src/processor/NotificationsEmailProcessor.ts index 4a190a8bb7..f9e9ac7bd3 100644 --- a/plugins/notifications-backend-module-email/src/processor/NotificationsEmailProcessor.ts +++ b/plugins/notifications-backend-module-email/src/processor/NotificationsEmailProcessor.ts @@ -58,7 +58,7 @@ export class NotificationsEmailProcessor implements NotificationProcessor { config.getOptionalString('notifications.email.format') ?? 'html'; this.replyTo = config.getOptionalString('notifications.email.replyTo'); this.cacheTtl = - config.getOptionalNumber('notifications.email.cacheTtl') ?? 3_600_000; + config.getOptionalNumber('notifications.email.cache.ttl') ?? 3_600_000; } private async getTransporter() {