Don't delete old document after sticker upload.

This commit is contained in:
levlam 2021-07-28 21:39:17 +03:00
parent 4ed0b15a41
commit a6151aff7b

View File

@ -5029,9 +5029,10 @@ void StickersManager::on_uploaded_sticker_file(FileId file_id, tl_object_ptr<tel
}
if (is_animated) {
merge_stickers(parsed_document.file_id, file_id, true);
merge_stickers(parsed_document.file_id, file_id, false);
} else {
td_->documents_manager_->merge_documents(parsed_document.file_id, file_id, true);
// must not delete the old document, because the file_id could be used for simultaneous URL uploads
td_->documents_manager_->merge_documents(parsed_document.file_id, file_id, false);
}
promise.set_value(Unit());
}