From a6151aff7b050443e7487f5fd2e600f5d5f7b57b Mon Sep 17 00:00:00 2001 From: levlam Date: Wed, 28 Jul 2021 21:39:17 +0300 Subject: [PATCH] Don't delete old document after sticker upload. --- td/telegram/StickersManager.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/td/telegram/StickersManager.cpp b/td/telegram/StickersManager.cpp index b8a47477d..f59627821 100644 --- a/td/telegram/StickersManager.cpp +++ b/td/telegram/StickersManager.cpp @@ -5029,9 +5029,10 @@ void StickersManager::on_uploaded_sticker_file(FileId file_id, tl_object_ptrdocuments_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()); }