1
0
mirror of https://github.com/bitwarden/server synced 2026-01-03 09:03:44 +00:00

Merge branch 'main' into SM-1571-DisableSMAdsForUsers

This commit is contained in:
cd-bitwarden
2025-10-23 12:05:50 -04:00
committed by GitHub

View File

@@ -162,14 +162,24 @@ public class HubHelpers
var organizationBankAccountVerifiedNotification =
JsonSerializer.Deserialize<PushNotificationData<OrganizationBankAccountVerifiedPushNotification>>(
notificationJson, _deserializerOptions);
await hubContext.Clients.Group(NotificationsHub.GetOrganizationGroup(organizationBankAccountVerifiedNotification.Payload.OrganizationId))
if (organizationBankAccountVerifiedNotification is null)
{
break;
}
await _hubContext.Clients.Group(NotificationsHub.GetOrganizationGroup(organizationBankAccountVerifiedNotification.Payload.OrganizationId))
.SendAsync(_receiveMessageMethod, organizationBankAccountVerifiedNotification, cancellationToken);
break;
case PushType.ProviderBankAccountVerified:
var providerBankAccountVerifiedNotification =
JsonSerializer.Deserialize<PushNotificationData<ProviderBankAccountVerifiedPushNotification>>(
notificationJson, _deserializerOptions);
await hubContext.Clients.User(providerBankAccountVerifiedNotification.Payload.AdminId.ToString())
if (providerBankAccountVerifiedNotification is null)
{
break;
}
await _hubContext.Clients.User(providerBankAccountVerifiedNotification.Payload.AdminId.ToString())
.SendAsync(_receiveMessageMethod, providerBankAccountVerifiedNotification, cancellationToken);
break;
case PushType.Notification:
@@ -222,7 +232,7 @@ public class HubHelpers
.SendAsync(_receiveMessageMethod, pendingTasksData, cancellationToken);
break;
default:
logger.LogWarning("Notification type '{NotificationType}' has not been registered in HubHelpers and will not be pushed as as result", notification.Type);
_logger.LogWarning("Notification type '{NotificationType}' has not been registered in HubHelpers and will not be pushed as as result", notification.Type);
break;
}
}