From c9f12fe73fb12869645fe2a963878a1921e32f56 Mon Sep 17 00:00:00 2001 From: levlam Date: Thu, 30 Apr 2020 22:28:52 +0300 Subject: [PATCH] Do not use SequenceDispatcher for poll stop by bots. GitOrigin-RevId: a86c1ad6d852a14755813e8987702052a9d02113 --- td/telegram/PollManager.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/td/telegram/PollManager.cpp b/td/telegram/PollManager.cpp index 954e6d0f2..f4557050d 100644 --- a/td/telegram/PollManager.cpp +++ b/td/telegram/PollManager.cpp @@ -207,9 +207,13 @@ class StopPollActor : public NetActorOnce { auto query = G()->net_query_creator().create(telegram_api::messages_editMessage( flags, false /*ignored*/, std::move(input_peer), message_id, string(), std::move(input_media), std::move(input_reply_markup), vector>(), 0)); - auto sequence_id = -1; - send_closure(td->messages_manager_->sequence_dispatcher_, &MultiSequenceDispatcher::send_with_callback, - std::move(query), actor_shared(this), sequence_id); + if (td->auth_manager_->is_bot()) { + send_query(std::move(query)); + } else { + auto sequence_id = -1; + send_closure(td->messages_manager_->sequence_dispatcher_, &MultiSequenceDispatcher::send_with_callback, + std::move(query), actor_shared(this), sequence_id); + } } void on_result(uint64 id, BufferSlice packet) override {