mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-17 17:14:18 +02:00
Notifications can be tested
Notification ImplementationType was added for showing in UI (Humanized/Title cased of Implementation)
This commit is contained in:
@@ -69,7 +69,7 @@ namespace NzbDrone.Core.Notifications
|
||||
var newNotification = new Notification();
|
||||
newNotification.Instance = (INotification)_container.Resolve(type);
|
||||
newNotification.Id = i;
|
||||
newNotification.Name = notification.Name;
|
||||
newNotification.ImplementationName = notification.ImplementationName;
|
||||
|
||||
var instanceType = newNotification.Instance.GetType();
|
||||
var baseGenArgs = instanceType.BaseType.GetGenericArguments();
|
||||
@@ -120,6 +120,7 @@ namespace NzbDrone.Core.Notifications
|
||||
notification.Instance = GetInstance(definition);
|
||||
notification.Name = definition.Name;
|
||||
notification.Implementation = definition.Implementation;
|
||||
notification.ImplementationName = notification.Instance.ImplementationName;
|
||||
notification.Settings = ((dynamic)notification.Instance).ImportSettingsFromJson(definition.Settings);
|
||||
|
||||
return notification;
|
||||
|
Reference in New Issue
Block a user