From 7873dd14ca2d71291b9044d4a2d7a039f4a06c69 Mon Sep 17 00:00:00 2001 From: Bardin08 Date: Sun, 2 Jun 2024 17:52:24 +0300 Subject: [PATCH] Fix issue with empty notification ID --- src/Core/Services/NotificationService.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Core/Services/NotificationService.cs b/src/Core/Services/NotificationService.cs index 0f418b9..67e2e13 100644 --- a/src/Core/Services/NotificationService.cs +++ b/src/Core/Services/NotificationService.cs @@ -22,6 +22,7 @@ public async Task> CreateNotification( ct.ThrowIfCancellationRequested(); await notificationsRepository.InsertOne(notification); + dto = dto with { Id = notification.Id.ToString() }; var deliveryRequests = CreateDeliveryRequests(dto).ToList(); @@ -31,8 +32,7 @@ public async Task> CreateNotification( await notificationsAnalyticsClient .SendNotificationCreated(deliveryRequest.NotificationId, ct); } - - dto = dto with { Id = notification.Id.ToString() }; + return dto; }