mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-17 22:14:26 +01:00
* Allow disabling notifications per user and disabling specific notifications per use closes #1974 * Add disable notifs for all users * fix term generator for notifications * sow checkboxes instead of multiselect when js is enabled * remove js dependency * fix notif conditions
20 lines
680 B
C#
20 lines
680 B
C#
using System;
|
|
using BTCPayServer.Contracts;
|
|
|
|
namespace BTCPayServer.Services.Notifications
|
|
{
|
|
|
|
public abstract class NotificationHandler<TNotification> : INotificationHandler
|
|
{
|
|
public abstract string NotificationType { get; }
|
|
Type INotificationHandler.NotificationBlobType => typeof(TNotification);
|
|
public abstract (string identifier, string name)[] Meta { get; }
|
|
|
|
void INotificationHandler.FillViewModel(object notification, NotificationViewModel vm)
|
|
{
|
|
FillViewModel((TNotification)notification, vm);
|
|
}
|
|
protected abstract void FillViewModel(TNotification notification, NotificationViewModel vm);
|
|
}
|
|
}
|