mirror of
https://github.com/bitwarden/server
synced 2025-12-06 00:03:34 +00:00
Fix HubHelpers field references causing build error (#6487)
This commit is contained in:
@@ -162,14 +162,24 @@ public class HubHelpers
|
|||||||
var organizationBankAccountVerifiedNotification =
|
var organizationBankAccountVerifiedNotification =
|
||||||
JsonSerializer.Deserialize<PushNotificationData<OrganizationBankAccountVerifiedPushNotification>>(
|
JsonSerializer.Deserialize<PushNotificationData<OrganizationBankAccountVerifiedPushNotification>>(
|
||||||
notificationJson, _deserializerOptions);
|
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);
|
.SendAsync(_receiveMessageMethod, organizationBankAccountVerifiedNotification, cancellationToken);
|
||||||
break;
|
break;
|
||||||
case PushType.ProviderBankAccountVerified:
|
case PushType.ProviderBankAccountVerified:
|
||||||
var providerBankAccountVerifiedNotification =
|
var providerBankAccountVerifiedNotification =
|
||||||
JsonSerializer.Deserialize<PushNotificationData<ProviderBankAccountVerifiedPushNotification>>(
|
JsonSerializer.Deserialize<PushNotificationData<ProviderBankAccountVerifiedPushNotification>>(
|
||||||
notificationJson, _deserializerOptions);
|
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);
|
.SendAsync(_receiveMessageMethod, providerBankAccountVerifiedNotification, cancellationToken);
|
||||||
break;
|
break;
|
||||||
case PushType.Notification:
|
case PushType.Notification:
|
||||||
@@ -222,7 +232,7 @@ public class HubHelpers
|
|||||||
.SendAsync(_receiveMessageMethod, pendingTasksData, cancellationToken);
|
.SendAsync(_receiveMessageMethod, pendingTasksData, cancellationToken);
|
||||||
break;
|
break;
|
||||||
default:
|
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;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user