Don't keep setTyping query reference for bots.
This commit is contained in:
parent
ad431a612e
commit
c075ad7b00
@ -31771,14 +31771,19 @@ void MessagesManager::send_dialog_action(DialogId dialog_id, MessageId top_threa
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
auto new_query_ref =
|
||||||
|
td_->create_handler<SetTypingQuery>(std::move(promise))
|
||||||
|
->send(dialog_id, std::move(input_peer), top_thread_message_id, action.get_input_send_message_action());
|
||||||
|
if (td_->auth_manager_->is_bot()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
auto &query_ref = set_typing_query_[dialog_id];
|
auto &query_ref = set_typing_query_[dialog_id];
|
||||||
if (!query_ref.empty() && !td_->auth_manager_->is_bot()) {
|
if (!query_ref.empty()) {
|
||||||
LOG(INFO) << "Cancel previous send chat action query";
|
LOG(INFO) << "Cancel previous send chat action query";
|
||||||
cancel_query(query_ref);
|
cancel_query(query_ref);
|
||||||
}
|
}
|
||||||
query_ref =
|
query_ref = std::move(new_query_ref);
|
||||||
td_->create_handler<SetTypingQuery>(std::move(promise))
|
|
||||||
->send(dialog_id, std::move(input_peer), top_thread_message_id, action.get_input_send_message_action());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void MessagesManager::after_set_typing_query(DialogId dialog_id, int32 generation) {
|
void MessagesManager::after_set_typing_query(DialogId dialog_id, int32 generation) {
|
||||||
|
Loading…
Reference in New Issue
Block a user