From f96e3ee01b2e80f9059c7aead0ecb46558b9047c Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Tue, 28 Aug 2018 08:29:54 -0400 Subject: [PATCH] add push events throughout user service actions --- src/Core/Services/Implementations/UserService.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/Core/Services/Implementations/UserService.cs b/src/Core/Services/Implementations/UserService.cs index 6ba1d6ce9b..16abfe579f 100644 --- a/src/Core/Services/Implementations/UserService.cs +++ b/src/Core/Services/Implementations/UserService.cs @@ -183,6 +183,7 @@ namespace Bit.Core.Services } await _userRepository.DeleteAsync(user); + await _pushService.PushLogOutAsync(user.Id); return IdentityResult.Success; } @@ -408,6 +409,7 @@ namespace Bit.Core.Services user.EmailVerified = true; user.RevisionDate = user.AccountRevisionDate = DateTime.UtcNow; await _userRepository.ReplaceAsync(user); + await _pushService.PushLogOutAsync(user.Id); return IdentityResult.Success; } @@ -438,6 +440,7 @@ namespace Bit.Core.Services await _userRepository.ReplaceAsync(user); await _eventService.LogUserEventAsync(user.Id, EventType.User_ChangedPassword); + await _pushService.PushLogOutAsync(user.Id); return IdentityResult.Success; } @@ -467,6 +470,7 @@ namespace Bit.Core.Services user.Kdf = kdf; user.KdfIterations = kdfIterations; await _userRepository.ReplaceAsync(user); + await _pushService.PushLogOutAsync(user.Id); return IdentityResult.Success; } @@ -502,6 +506,7 @@ namespace Bit.Core.Services await _userRepository.ReplaceAsync(user); } + await _pushService.PushLogOutAsync(user.Id); return IdentityResult.Success; } @@ -525,6 +530,7 @@ namespace Bit.Core.Services } await SaveUserAsync(user); + await _pushService.PushLogOutAsync(user.Id); return IdentityResult.Success; } @@ -657,6 +663,7 @@ namespace Bit.Core.Services try { await SaveUserAsync(user); + await _pushService.PushSyncVaultAsync(user.Id); } catch when(!_globalSettings.SelfHosted) {