From 17055273bfdce7df6df4d203777d0df58fd43160 Mon Sep 17 00:00:00 2001 From: stasex Date: Sat, 11 Nov 2023 00:23:54 +0200 Subject: [PATCH] added a condition to call adding a message --- .../Services/ProductService.cs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/ShoppingAssistantApi.Infrastructure/Services/ProductService.cs b/ShoppingAssistantApi.Infrastructure/Services/ProductService.cs index 721b2a8..e18da09 100644 --- a/ShoppingAssistantApi.Infrastructure/Services/ProductService.cs +++ b/ShoppingAssistantApi.Infrastructure/Services/ProductService.cs @@ -178,11 +178,14 @@ public class ProductService : IProductService } } } - _wishlistsService.AddMessageToPersonalWishlistAsync(wishlistId, new MessageCreateDto() + if (currentDataType == SearchEventType.Message) { - Text = messageBuffer.Text, - }, cancellationToken); - mqchecker = false; + _wishlistsService.AddMessageToPersonalWishlistAsync(wishlistId, new MessageCreateDto() + { + Text = messageBuffer.Text, + }, cancellationToken); + mqchecker = false; + } } private SearchEventType DetermineDataType(string dataTypeHolder)