diff options
| author | jluce50 <jeremyluce@gmail.com> | 2015-03-03 09:42:17 -0600 |
|---|---|---|
| committer | jluce50 <jeremyluce@gmail.com> | 2015-03-03 09:42:17 -0600 |
| commit | 6c2e01830c7234438b879af633caaf415f560a5a (patch) | |
| tree | afd595af2f85888544f437b2a367e241ade607dc /MediaBrowser.Server.Implementations/EntryPoints/Notifications | |
| parent | 7fd26410a9c49e84a146dfd77a2732b2330c3834 (diff) | |
| parent | 2fc0686c308e74654f4f7ef9ea6cf56fb61b5ff5 (diff) | |
Merge pull request #1 from MediaBrowser/dev
Dev
Diffstat (limited to 'MediaBrowser.Server.Implementations/EntryPoints/Notifications')
| -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() |
