1
0
mirror of https://github.com/bitwarden/server synced 2025-12-14 15:23:42 +00:00

PM-10564: Nullable identifier in IPushNotificationService

This commit is contained in:
Maciej Zieniuk
2024-11-21 23:05:46 +00:00
parent 3885885d5f
commit 1285a7e994
6 changed files with 12 additions and 12 deletions

View File

@@ -29,9 +29,9 @@ public interface IPushNotificationService
Task PushAuthRequestAsync(AuthRequest authRequest); Task PushAuthRequestAsync(AuthRequest authRequest);
Task PushAuthRequestResponseAsync(AuthRequest authRequest); Task PushAuthRequestResponseAsync(AuthRequest authRequest);
Task SendPayloadToUserAsync(string userId, PushType type, object payload, string identifier, Task SendPayloadToUserAsync(string userId, PushType type, object payload, string? identifier,
string? deviceId = null, ClientType? clientType = null); string? deviceId = null, ClientType? clientType = null);
Task SendPayloadToOrganizationAsync(string orgId, PushType type, object payload, string identifier, Task SendPayloadToOrganizationAsync(string orgId, PushType type, object payload, string? identifier,
string? deviceId = null, ClientType? clientType = null); string? deviceId = null, ClientType? clientType = null);
} }

View File

@@ -230,14 +230,14 @@ public class AzureQueuePushNotificationService : IPushNotificationService
return currentContext?.DeviceIdentifier; return currentContext?.DeviceIdentifier;
} }
public Task SendPayloadToUserAsync(string userId, PushType type, object payload, string identifier, public Task SendPayloadToUserAsync(string userId, PushType type, object payload, string? identifier,
string? deviceId = null, ClientType? clientType = null) string? deviceId = null, ClientType? clientType = null)
{ {
// Noop // Noop
return Task.FromResult(0); return Task.FromResult(0);
} }
public Task SendPayloadToOrganizationAsync(string orgId, PushType type, object payload, string identifier, public Task SendPayloadToOrganizationAsync(string orgId, PushType type, object payload, string? identifier,
string? deviceId = null, ClientType? clientType = null) string? deviceId = null, ClientType? clientType = null)
{ {
// Noop // Noop

View File

@@ -132,14 +132,14 @@ public class MultiServicePushNotificationService : IPushNotificationService
return Task.FromResult(0); return Task.FromResult(0);
} }
public Task SendPayloadToUserAsync(string userId, PushType type, object payload, string identifier, public Task SendPayloadToUserAsync(string userId, PushType type, object payload, string? identifier,
string? deviceId = null, ClientType? clientType = null) string? deviceId = null, ClientType? clientType = null)
{ {
PushToServices((s) => s.SendPayloadToUserAsync(userId, type, payload, identifier, deviceId, clientType)); PushToServices((s) => s.SendPayloadToUserAsync(userId, type, payload, identifier, deviceId, clientType));
return Task.FromResult(0); return Task.FromResult(0);
} }
public Task SendPayloadToOrganizationAsync(string orgId, PushType type, object payload, string identifier, public Task SendPayloadToOrganizationAsync(string orgId, PushType type, object payload, string? identifier,
string? deviceId = null, ClientType? clientType = null) string? deviceId = null, ClientType? clientType = null)
{ {
PushToServices((s) => s.SendPayloadToOrganizationAsync(orgId, type, payload, identifier, deviceId, clientType)); PushToServices((s) => s.SendPayloadToOrganizationAsync(orgId, type, payload, identifier, deviceId, clientType));

View File

@@ -236,14 +236,14 @@ public class NotificationsApiPushNotificationService : BaseIdentityClientService
return currentContext?.DeviceIdentifier; return currentContext?.DeviceIdentifier;
} }
public Task SendPayloadToUserAsync(string userId, PushType type, object payload, string identifier, public Task SendPayloadToUserAsync(string userId, PushType type, object payload, string? identifier,
string? deviceId = null, ClientType? clientType = null) string? deviceId = null, ClientType? clientType = null)
{ {
// Noop // Noop
return Task.FromResult(0); return Task.FromResult(0);
} }
public Task SendPayloadToOrganizationAsync(string orgId, PushType type, object payload, string identifier, public Task SendPayloadToOrganizationAsync(string orgId, PushType type, object payload, string? identifier,
string? deviceId = null, ClientType? clientType = null) string? deviceId = null, ClientType? clientType = null)
{ {
// Noop // Noop

View File

@@ -287,13 +287,13 @@ public class RelayPushNotificationService : BaseIdentityClientService, IPushNoti
} }
} }
public Task SendPayloadToUserAsync(string userId, PushType type, object payload, string identifier, public Task SendPayloadToUserAsync(string userId, PushType type, object payload, string? identifier,
string? deviceId = null, ClientType? clientType = null) string? deviceId = null, ClientType? clientType = null)
{ {
throw new NotImplementedException(); throw new NotImplementedException();
} }
public Task SendPayloadToOrganizationAsync(string orgId, PushType type, object payload, string identifier, public Task SendPayloadToOrganizationAsync(string orgId, PushType type, object payload, string? identifier,
string? deviceId = null, ClientType? clientType = null) string? deviceId = null, ClientType? clientType = null)
{ {
throw new NotImplementedException(); throw new NotImplementedException();

View File

@@ -84,7 +84,7 @@ public class NoopPushNotificationService : IPushNotificationService
return Task.FromResult(0); return Task.FromResult(0);
} }
public Task SendPayloadToOrganizationAsync(string orgId, PushType type, object payload, string identifier, public Task SendPayloadToOrganizationAsync(string orgId, PushType type, object payload, string? identifier,
string? deviceId = null, ClientType? clientType = null) string? deviceId = null, ClientType? clientType = null)
{ {
return Task.FromResult(0); return Task.FromResult(0);
@@ -100,7 +100,7 @@ public class NoopPushNotificationService : IPushNotificationService
return Task.FromResult(0); return Task.FromResult(0);
} }
public Task SendPayloadToUserAsync(string userId, PushType type, object payload, string identifier, public Task SendPayloadToUserAsync(string userId, PushType type, object payload, string? identifier,
string? deviceId = null, ClientType? clientType = null) string? deviceId = null, ClientType? clientType = null)
{ {
return Task.FromResult(0); return Task.FromResult(0);