diff --git a/backend/src/Notifo.Domain.Integrations/MessageBird/MessageBirdSmsIntegration.Sms.cs b/backend/src/Notifo.Domain.Integrations/MessageBird/MessageBirdSmsIntegration.Sms.cs index 43674d2e..153ed152 100644 --- a/backend/src/Notifo.Domain.Integrations/MessageBird/MessageBirdSmsIntegration.Sms.cs +++ b/backend/src/Notifo.Domain.Integrations/MessageBird/MessageBirdSmsIntegration.Sms.cs @@ -105,7 +105,6 @@ public async Task HandleRequestAsync(IntegrationContext context, HttpContext htt var status = await GetClient(context).ParseSmsWebhookAsync(httpContext); var result = ParseStatus(status); - if (result == default) { return; diff --git a/backend/src/Notifo.Domain.Integrations/MessageBird/MessageBirdWhatsAppIntegration.Messaging.cs b/backend/src/Notifo.Domain.Integrations/MessageBird/MessageBirdWhatsAppIntegration.Messaging.cs index 53aa3eb2..e75dd671 100644 --- a/backend/src/Notifo.Domain.Integrations/MessageBird/MessageBirdWhatsAppIntegration.Messaging.cs +++ b/backend/src/Notifo.Domain.Integrations/MessageBird/MessageBirdWhatsAppIntegration.Messaging.cs @@ -119,7 +119,6 @@ public async Task HandleRequestAsync(IntegrationContext context, HttpContext htt } var deliveryStatus = ParseStatus(status); - if (deliveryStatus == default) { return; diff --git a/backend/src/Notifo.Domain.Integrations/OpenNotifications/OpenNotificationsSmsIntegration.cs b/backend/src/Notifo.Domain.Integrations/OpenNotifications/OpenNotificationsSmsIntegration.cs index 4f8a7d2b..19302d4e 100644 --- a/backend/src/Notifo.Domain.Integrations/OpenNotifications/OpenNotificationsSmsIntegration.cs +++ b/backend/src/Notifo.Domain.Integrations/OpenNotifications/OpenNotificationsSmsIntegration.cs @@ -68,36 +68,35 @@ public async Task HandleRequestAsync(IntegrationContext context, HttpContext htt var response = await Client.Providers.HandleWebhookAsync(requestDto, default); - var http = response.Http; - - if (http != null) + if (response.Http != null) { var httpResponse = httpContext.Response; - if (http.Headers != null) + if (response.Http.Headers != null) { - foreach (var (key, value) in http.Headers) + foreach (var (key, value) in response.Http.Headers) { httpResponse.Headers[key] = value; } } - if (http.StatusCode != null) + if (response.Http.StatusCode != null) { - httpResponse.StatusCode = http.StatusCode.Value; + httpResponse.StatusCode = response.Http.StatusCode.Value; } - if (http.Body != null) + if (response.Http.Body != null) { - await httpResponse.WriteAsync(http.Body, default); + await httpResponse.WriteAsync(response.Http.Body, default); } } - var status = response.Status; - - if (status != null) + if (response.Statuses != null) { - await context.UpdateStatusAsync(status.TrackingToken, status.ToDeliveryResult()); + foreach (var status in response.Statuses) + { + await context.UpdateStatusAsync(status.TrackingToken, status.ToDeliveryResult()); + } } } } diff --git a/backend/src/Notifo.Domain.Integrations/Telegram/TelegramIntegration.Messaging.cs b/backend/src/Notifo.Domain.Integrations/Telegram/TelegramIntegration.Messaging.cs index 263a144c..dcd5d791 100644 --- a/backend/src/Notifo.Domain.Integrations/Telegram/TelegramIntegration.Messaging.cs +++ b/backend/src/Notifo.Domain.Integrations/Telegram/TelegramIntegration.Messaging.cs @@ -112,7 +112,6 @@ private async Task UpdateUser(IntegrationContext context, TelegramUser from, Tel } var user = await context.IntegrationAdapter.FindUserByPropertyAsync(context.AppId, UserUsername.Name, username, default); - if (user == null) { await SendMessageAsync(context, GetUserNotFoundMessage(context), chatId, ct); diff --git a/backend/src/Notifo.Domain.Integrations/Telekom/TelekomSmsIntegration.Sms.cs b/backend/src/Notifo.Domain.Integrations/Telekom/TelekomSmsIntegration.Sms.cs index 41e9f7ad..0f2fb8eb 100644 --- a/backend/src/Notifo.Domain.Integrations/Telekom/TelekomSmsIntegration.Sms.cs +++ b/backend/src/Notifo.Domain.Integrations/Telekom/TelekomSmsIntegration.Sms.cs @@ -95,7 +95,6 @@ public Task HandleRequestAsync(IntegrationContext context, HttpContext httpConte var status = httpContext.Request.Form[RequestKeys.MessageStatus].ToString(); var result = ParseStatus(status); - if (result == default) { return Task.CompletedTask; diff --git a/backend/src/Notifo.Domain.Integrations/Twilio/TwilioSmsIntegration.Sms.cs b/backend/src/Notifo.Domain.Integrations/Twilio/TwilioSmsIntegration.Sms.cs index a5605f1f..fce8c324 100644 --- a/backend/src/Notifo.Domain.Integrations/Twilio/TwilioSmsIntegration.Sms.cs +++ b/backend/src/Notifo.Domain.Integrations/Twilio/TwilioSmsIntegration.Sms.cs @@ -83,7 +83,6 @@ public Task HandleRequestAsync(IntegrationContext context, HttpContext httpConte var status = httpContext.Request.Form[RequestKeys.MessageStatus].ToString(); var result = ParseStatus(status); - if (result == default) { return Task.CompletedTask;