Skip to content

A modern, self-hosted backup solution for secure, encrypted backups across local and cloud storage.

416 B
Raw Blame
import { BaseNotification } from './BaseNotification';
import { NotificationChannel } from './NotificationChannel';

export class NotificationManager {
	private channels: NotificationChannel[] = [];

	registerChannel(channel: NotificationChannel) {
		this.channels.push(channel);
	}

	async notify(notification: BaseNotification) {
		await Promise.all(this.channels.map(channel => channel.send(notification)));
	}
}