mirror of
https://github.com/bitwarden/server.git
synced 2025-07-01 08:02:49 -05:00
PM-10600: Required attribute, organization group for push notification fix
This commit is contained in:
@ -10,8 +10,8 @@ public class PushSendRequestModel : IValidatableObject
|
||||
public string? OrganizationId { get; set; }
|
||||
public string? DeviceId { get; set; }
|
||||
public string? Identifier { get; set; }
|
||||
[Required] public PushType Type { get; set; }
|
||||
[Required] public object Payload { get; set; } = null!;
|
||||
public required PushType Type { get; set; }
|
||||
public required object Payload { get; set; }
|
||||
public ClientType? ClientType { get; set; }
|
||||
|
||||
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
|
||||
|
@ -80,7 +80,7 @@ public class NotificationsHub : Microsoft.AspNetCore.SignalR.Hub
|
||||
|
||||
public static string GetOrganizationGroup(Guid organizationId, ClientType? clientType = null)
|
||||
{
|
||||
return clientType is not ClientType.All
|
||||
return clientType is null or ClientType.All
|
||||
? $"Organization_{organizationId}"
|
||||
: $"OrganizationClientType_{organizationId}_{clientType}";
|
||||
}
|
||||
|
Reference in New Issue
Block a user