1
0
mirror of https://github.com/bitwarden/server.git synced 2025-06-30 15:42:48 -05:00

PM-15084: Log verbosity on lack of installation id

This commit is contained in:
Maciej Zieniuk
2024-12-18 23:53:08 +00:00
parent d21d4a67b3
commit 186a09bb92
2 changed files with 13 additions and 1 deletions

View File

@ -45,6 +45,11 @@ public class NotificationHubPushNotificationService : IPushNotificationService
_notificationHubPool = notificationHubPool;
_logger = logger;
_globalSettings = globalSettings;
if (globalSettings.Installation.Id == default)
{
logger.LogWarning("Installation ID is not set. Push notifications for installations will not work.");
}
}
public async Task PushSyncCipherCreateAsync(Cipher cipher, IEnumerable<Guid> collectionIds)

View File

@ -13,6 +13,7 @@ using Bit.Core.Utilities;
using Bit.Core.Vault.Entities;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
namespace Bit.Core.Services;
@ -25,11 +26,17 @@ public class AzureQueuePushNotificationService : IPushNotificationService
public AzureQueuePushNotificationService(
[FromKeyedServices("notifications")] QueueClient queueClient,
IHttpContextAccessor httpContextAccessor,
IGlobalSettings globalSettings)
IGlobalSettings globalSettings,
ILogger<AzureQueuePushNotificationService> logger)
{
_queueClient = queueClient;
_httpContextAccessor = httpContextAccessor;
_globalSettings = globalSettings;
if (globalSettings.Installation.Id == default)
{
logger.LogWarning("Installation ID is not set. Push notifications for installations will not work.");
}
}
public async Task PushSyncCipherCreateAsync(Cipher cipher, IEnumerable<Guid> collectionIds)