Don't try to fail message edits while closing.
This commit is contained in:
parent
36d05295d6
commit
3a9ea05a50
@ -13523,20 +13523,26 @@ void MessagesManager::hangup() {
|
||||
auto it = being_uploaded_files_.begin();
|
||||
auto full_message_id = it->second.first;
|
||||
being_uploaded_files_.erase(it);
|
||||
if (full_message_id.get_message_id().is_yet_unsent()) {
|
||||
fail_send_message(full_message_id, Global::request_aborted_error());
|
||||
}
|
||||
}
|
||||
while (!being_uploaded_thumbnails_.empty()) {
|
||||
auto it = being_uploaded_thumbnails_.begin();
|
||||
auto full_message_id = it->second.full_message_id;
|
||||
being_uploaded_thumbnails_.erase(it);
|
||||
if (full_message_id.get_message_id().is_yet_unsent()) {
|
||||
fail_send_message(full_message_id, Global::request_aborted_error());
|
||||
}
|
||||
}
|
||||
while (!being_loaded_secret_thumbnails_.empty()) {
|
||||
auto it = being_loaded_secret_thumbnails_.begin();
|
||||
auto full_message_id = it->second.full_message_id;
|
||||
being_loaded_secret_thumbnails_.erase(it);
|
||||
if (full_message_id.get_message_id().is_yet_unsent()) {
|
||||
fail_send_message(full_message_id, Global::request_aborted_error());
|
||||
}
|
||||
}
|
||||
while (!being_sent_messages_.empty()) {
|
||||
on_send_message_fail(being_sent_messages_.begin()->first, Global::request_aborted_error());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user