From f43f59e4b4af5e61f5b0c298715aeb3ee991ac5a Mon Sep 17 00:00:00 2001 From: Matt Gibson Date: Thu, 24 Oct 2024 12:45:13 -0700 Subject: [PATCH] Register noop notification registration service for self host lacking necessary data (#4939) --- src/SharedWeb/Utilities/ServiceCollectionExtensions.cs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/SharedWeb/Utilities/ServiceCollectionExtensions.cs b/src/SharedWeb/Utilities/ServiceCollectionExtensions.cs index b0a2c42ea..5a5585952 100644 --- a/src/SharedWeb/Utilities/ServiceCollectionExtensions.cs +++ b/src/SharedWeb/Utilities/ServiceCollectionExtensions.cs @@ -274,6 +274,11 @@ public static class ServiceCollectionExtensions services.AddKeyedSingleton("implementation"); services.AddSingleton(); } + else + { + services.AddSingleton(); + } + if (CoreHelpers.SettingHasValue(globalSettings.InternalIdentityKey) && CoreHelpers.SettingHasValue(globalSettings.BaseServiceUri.InternalNotifications)) { @@ -290,10 +295,6 @@ public static class ServiceCollectionExtensions services.AddKeyedSingleton("implementation"); } } - else - { - services.AddSingleton(); - } if (!globalSettings.SelfHosted && CoreHelpers.SettingHasValue(globalSettings.Mail.ConnectionString)) {