Skip to content

Commit

Permalink
Don't delete old document after sticker upload.
Browse files Browse the repository at this point in the history
  • Loading branch information
levlam committed Jul 28, 2021
1 parent 4ed0b15 commit a6151af
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions td/telegram/StickersManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
Expand Down

0 comments on commit a6151af

Please sign in to comment.