From 2df3485078334dcf85150dbfc9cca8180afa63de Mon Sep 17 00:00:00 2001 From: Rikitav Date: Tue, 12 Aug 2025 00:56:41 +0400 Subject: [PATCH] Added frozing collection after adding inlinequeryhandler once, no prevent multiple instances of this handler in collection --- Telegrator/MadiatorCore/Descriptors/HandlerDescriptorList.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Telegrator/MadiatorCore/Descriptors/HandlerDescriptorList.cs b/Telegrator/MadiatorCore/Descriptors/HandlerDescriptorList.cs index 4430864..103965e 100644 --- a/Telegrator/MadiatorCore/Descriptors/HandlerDescriptorList.cs +++ b/Telegrator/MadiatorCore/Descriptors/HandlerDescriptorList.cs @@ -79,6 +79,9 @@ namespace Telegrator.MadiatorCore.Descriptors descriptor.Indexer = descriptor.Indexer.UpdateIndex(count++); _innerCollection.Add(descriptor.Indexer, descriptor); + + if (_handlingType == UpdateType.InlineQuery) + IsReadOnly = true; } }