diff options
| author | Luke <luke.pulverenti@gmail.com> | 2015-03-19 13:21:35 -0400 |
|---|---|---|
| committer | Luke <luke.pulverenti@gmail.com> | 2015-03-19 13:21:35 -0400 |
| commit | 9926be0d9de688c04065c916e44ada4177b38a80 (patch) | |
| tree | 15338144a143948ffbee316641757e81489a7354 /MediaBrowser.Server.Implementations/EntryPoints/Notifications/Notifications.cs | |
| parent | b756e677d733992c2033bdd369980a37e17609e4 (diff) | |
| parent | 0564d454e5ad4f59702aa9022af6bb8fd064a9ff (diff) | |
Merge pull request #1043 from MediaBrowser/dev
3.0.5557.0
Diffstat (limited to 'MediaBrowser.Server.Implementations/EntryPoints/Notifications/Notifications.cs')
| -rw-r--r-- | MediaBrowser.Server.Implementations/EntryPoints/Notifications/Notifications.cs | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/MediaBrowser.Server.Implementations/EntryPoints/Notifications/Notifications.cs b/MediaBrowser.Server.Implementations/EntryPoints/Notifications/Notifications.cs index 37bca4ddb..f6a35973b 100644 --- a/MediaBrowser.Server.Implementations/EntryPoints/Notifications/Notifications.cs +++ b/MediaBrowser.Server.Implementations/EntryPoints/Notifications/Notifications.cs @@ -78,6 +78,22 @@ namespace MediaBrowser.Server.Implementations.EntryPoints.Notifications _appHost.HasUpdateAvailableChanged += _appHost_HasUpdateAvailableChanged; _appHost.ApplicationUpdated += _appHost_ApplicationUpdated; _deviceManager.CameraImageUploaded +=_deviceManager_CameraImageUploaded; + + _userManager.UserLockedOut += _userManager_UserLockedOut; + } + + async void _userManager_UserLockedOut(object sender, GenericEventArgs<User> e) + { + var type = NotificationType.UserLockedOut.ToString(); + + var notification = new NotificationRequest + { + NotificationType = type + }; + + notification.Variables["UserName"] = e.Argument.Name; + + await SendNotification(notification).ConfigureAwait(false); } async void _deviceManager_CameraImageUploaded(object sender, GenericEventArgs<CameraImageUploadInfo> e) @@ -235,7 +251,6 @@ namespace MediaBrowser.Server.Implementations.EntryPoints.Notifications return; } - var notification = new NotificationRequest { NotificationType = type @@ -471,6 +486,7 @@ namespace MediaBrowser.Server.Implementations.EntryPoints.Notifications _appHost.ApplicationUpdated -= _appHost_ApplicationUpdated; _deviceManager.CameraImageUploaded -= _deviceManager_CameraImageUploaded; + _userManager.UserLockedOut -= _userManager_UserLockedOut; } private void DisposeLibraryUpdateTimer() |
