Do not use SequenceDispatcher for poll stop by bots.

GitOrigin-RevId: a86c1ad6d852a14755813e8987702052a9d02113
This commit is contained in:
levlam 2020-04-30 22:28:52 +03:00
parent 3175ed4c0a
commit c9f12fe73f

View File

@ -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<tl_object_ptr<telegram_api::MessageEntity>>(), 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 {