2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-05 08:55:59 +00:00

Secure files upload / download support.

This commit is contained in:
John Preston
2018-03-25 15:37:57 +04:00
parent f633ead3ab
commit b2014f403e
15 changed files with 986 additions and 176 deletions

View File

@@ -493,6 +493,8 @@ void mtpFileLoader::makeRequest(int offset) {
MTPInputFileLocation mtpFileLoader::computeLocation() const {
if (_location) {
return MTP_inputFileLocation(MTP_long(_location->volume()), MTP_int(_location->local()), MTP_long(_location->secret()));
} else if (_locationType == SecureFileLocation) {
return MTP_inputSecureFileLocation(MTP_long(_id), MTP_long(_accessHash));
}
return MTP_inputDocumentFileLocation(MTP_long(_id), MTP_long(_accessHash), MTP_int(_version));
}