INNER CODE UNIT · TypeScript
NotificationManager
sct/overseerr · server/lib/notifications/index.ts:92
class NotificationManager {
private activeAgents: NotificationAgent[] = [];
public registerAgents = (agents: NotificationAgent[]): void => {
this.activeAgents = [...this.activeAgents, ...agents];
logger.info('Registered notification agents', { label: 'Notifications' });
};
public sendNotification(
type: Notification,
payload: NotificationPayload
): void {
logger.info(`Sending notification(s) for ${Notification[type]}`, {
label: 'Notifications',
subject: payload.subject,
});
this.activeAgents.forEach((agent) => {