From 990107721316d6a15c7f87e1f7361d0b6e6c2d50 Mon Sep 17 00:00:00 2001 From: gutii Date: Mon, 27 Apr 2026 22:15:39 +0400 Subject: [PATCH] * Added webhooking detection --- src/Telegrator.Hosting.WideBot/TypesExtensions.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Telegrator.Hosting.WideBot/TypesExtensions.cs b/src/Telegrator.Hosting.WideBot/TypesExtensions.cs index 0b5cabc..da4b685 100644 --- a/src/Telegrator.Hosting.WideBot/TypesExtensions.cs +++ b/src/Telegrator.Hosting.WideBot/TypesExtensions.cs @@ -114,7 +114,10 @@ public static class WideHostBuilderExtensions internal static void AddWideTelegratorInternal(IServiceCollection services, IConfiguration configuration, IDictionary properties, [NotNull] ref IHandlersCollection? handlers, TelegratorOptions? options = null) { if (services.Any(srvc => srvc.ServiceType == typeof(HostedUpdateReceiver))) - throw new InvalidOperationException("`HostedUpdateReceiver` found in services. WideHost extension is not compatible with long-polling receiving. Please, remove `AddTelegrator` invocation from your WebApp configuration."); + throw new InvalidOperationException("`HostedUpdateReceiver` found in services. WideHost extension is not compatible with default long-polling receiver. Please, remove `AddTelegrator` invocation from your Host configuration."); + + if (services.Any(srvc => srvc.ServiceType.Name == "HostedUpdateWebhooker")) + throw new InvalidOperationException("`HostedUpdateWebhooker` found in services. WideHost extension is not compatible with webhooking yet. Please, remove `AddWebTelegrator` invocation from your Host configuration."); if (options == null) {