Ensure ordering between messages.getMessagesReactions and channels.readMessageContents.

This commit is contained in:
levlam 2023-06-01 15:53:13 +03:00
parent 6b342e9b0d
commit 75e00df016
2 changed files with 8 additions and 4 deletions

View File

@ -134,8 +134,10 @@ class GetMessagesReactionsQuery final : public Td::ResultHandler {
auto input_peer = td_->messages_manager_->get_input_peer(dialog_id_, AccessRights::Read); auto input_peer = td_->messages_manager_->get_input_peer(dialog_id_, AccessRights::Read);
CHECK(input_peer != nullptr); CHECK(input_peer != nullptr);
send_query(G()->net_query_creator().create(telegram_api::messages_getMessagesReactions( send_query(
std::move(input_peer), MessageId::get_server_message_ids(message_ids_)))); G()->net_query_creator().create(telegram_api::messages_getMessagesReactions(
std::move(input_peer), MessageId::get_server_message_ids(message_ids_)),
{{dialog_id_}}));
} }
void on_result(BufferSlice packet) final { void on_result(BufferSlice packet) final {

View File

@ -1796,8 +1796,10 @@ class ReadChannelMessagesContentsQuery final : public Td::ResultHandler {
return on_error(Status::Error(400, "Can't access the chat")); return on_error(Status::Error(400, "Can't access the chat"));
} }
send_query(G()->net_query_creator().create(telegram_api::channels_readMessageContents( send_query(
std::move(input_channel), MessageId::get_server_message_ids(message_ids)))); G()->net_query_creator().create(telegram_api::channels_readMessageContents(
std::move(input_channel), MessageId::get_server_message_ids(message_ids)),
{{channel_id_}}));
} }
void on_result(BufferSlice packet) final { void on_result(BufferSlice packet) final {