fix(notif): include year in notifications (#1439)

* fix(notif): include year in notifications

* fix(lang): fix shared overwritten strings

* fix: check if email agent is actually enabled when generating passwords
This commit is contained in:
TheCatLady
2021-04-18 06:11:56 -04:00
committed by GitHub
parent 3ae7d0098b
commit 4e98f56753
8 changed files with 35 additions and 19 deletions

View File

@@ -1,5 +1,4 @@
import logger from '../../logger';
import { getSettings } from '../settings';
import type { NotificationAgent, NotificationPayload } from './agents/agent';
export enum Notification {
@@ -45,13 +44,13 @@ class NotificationManager {
type: Notification,
payload: NotificationPayload
): void {
const settings = getSettings().notifications;
logger.info(`Sending notification(s) for ${Notification[type]}`, {
label: 'Notifications',
subject: payload.subject,
});
this.activeAgents.forEach((agent) => {
if (settings.enabled && agent.shouldSend(type)) {
if (agent.shouldSend(type)) {
agent.send(type, payload);
}
});