1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-01 08:02:49 -05:00

[AC-2184] Fix push sync notification on opt-in to Flexible Collections (#3794)

* Fix push sync notification on opt-in to Flexible Collections

* Fix tests

* Fix tests more
This commit is contained in:
Thomas Rittson
2024-02-14 04:15:07 +10:00
committed by GitHub
parent ae5d6071ca
commit 0258f4949c
11 changed files with 47 additions and 9 deletions

View File

@ -15,6 +15,7 @@ public interface IPushNotificationService
Task PushSyncFolderDeleteAsync(Folder folder);
Task PushSyncCiphersAsync(Guid userId);
Task PushSyncVaultAsync(Guid userId);
Task PushSyncOrganizationsAsync(Guid userId);
Task PushSyncOrgKeysAsync(Guid userId);
Task PushSyncSettingsAsync(Guid userId);
Task PushLogOutAsync(Guid userId, bool excludeCurrentContextFromPush = false);

View File

@ -106,6 +106,11 @@ public class AzureQueuePushNotificationService : IPushNotificationService
await PushUserAsync(userId, PushType.SyncVault);
}
public async Task PushSyncOrganizationsAsync(Guid userId)
{
await PushUserAsync(userId, PushType.SyncOrganizations);
}
public async Task PushSyncOrgKeysAsync(Guid userId)
{
await PushUserAsync(userId, PushType.SyncOrgKeys);

View File

@ -105,6 +105,12 @@ public class MultiServicePushNotificationService : IPushNotificationService
return Task.FromResult(0);
}
public Task PushSyncOrganizationsAsync(Guid userId)
{
PushToServices((s) => s.PushSyncOrganizationsAsync(userId));
return Task.FromResult(0);
}
public Task PushSyncOrgKeysAsync(Guid userId)
{
PushToServices((s) => s.PushSyncOrgKeysAsync(userId));

View File

@ -117,6 +117,11 @@ public class NotificationHubPushNotificationService : IPushNotificationService
await PushUserAsync(userId, PushType.SyncVault);
}
public async Task PushSyncOrganizationsAsync(Guid userId)
{
await PushUserAsync(userId, PushType.SyncOrganizations);
}
public async Task PushSyncOrgKeysAsync(Guid userId)
{
await PushUserAsync(userId, PushType.SyncOrgKeys);

View File

@ -113,6 +113,11 @@ public class NotificationsApiPushNotificationService : BaseIdentityClientService
await PushUserAsync(userId, PushType.SyncVault);
}
public async Task PushSyncOrganizationsAsync(Guid userId)
{
await PushUserAsync(userId, PushType.SyncOrganizations);
}
public async Task PushSyncOrgKeysAsync(Guid userId)
{
await PushUserAsync(userId, PushType.SyncOrgKeys);

View File

@ -114,6 +114,11 @@ public class RelayPushNotificationService : BaseIdentityClientService, IPushNoti
await PushUserAsync(userId, PushType.SyncVault);
}
public async Task PushSyncOrganizationsAsync(Guid userId)
{
await PushUserAsync(userId, PushType.SyncOrganizations);
}
public async Task PushSyncOrgKeysAsync(Guid userId)
{
await PushUserAsync(userId, PushType.SyncOrgKeys);

View File

@ -42,6 +42,11 @@ public class NoopPushNotificationService : IPushNotificationService
return Task.FromResult(0);
}
public Task PushSyncOrganizationsAsync(Guid userId)
{
return Task.FromResult(0);
}
public Task PushSyncOrgKeysAsync(Guid userId)
{
return Task.FromResult(0);