feat: user profile/settings pages (#958)

This commit is contained in:
sct
2021-02-18 11:38:24 +09:00
committed by GitHub
parent 29b97ef6d8
commit bbb683e637
50 changed files with 2388 additions and 596 deletions

View File

@@ -21,12 +21,13 @@ class EmailAgent
return settings.notifications.agents.email;
}
public shouldSend(type: Notification): boolean {
public shouldSend(type: Notification, payload: NotificationPayload): boolean {
const settings = this.getSettings();
if (
settings.enabled &&
hasNotificationType(type, this.getSettings().types)
hasNotificationType(type, this.getSettings().types) &&
(payload.notifyUser.settings?.enableNotifications ?? true)
) {
return true;
}