diff --git a/td/telegram/files/FileManager.cpp b/td/telegram/files/FileManager.cpp index 9bc953c7f..0b763e387 100644 --- a/td/telegram/files/FileManager.cpp +++ b/td/telegram/files/FileManager.cpp @@ -743,14 +743,14 @@ Result FileManager::register_file(FileData data, FileLocationSource file bool new_remote = false; int32 remote_key = 0; if (file_view.has_remote_location()) { - RemoteInfo info{file_view.remote_location(), file_id, file_location_source}; + RemoteInfo info{file_view.remote_location(), file_id}; remote_key = remote_location_info_.add(info); auto &stored_info = remote_location_info_.get(remote_key); - if (stored_info.file_id == file_id) { + if (stored_info.file_id_ == file_id) { get_file_id_info(file_id)->pin_flag_ = true; new_remote = true; } else { - to_merge.push_back(stored_info.file_id); + to_merge.push_back(stored_info.file_id_); if (stored_info.remote_ == file_view.remote_location() && stored_info.remote_.get_access_hash() != file_view.remote_location().get_access_hash() && file_location_source == FileLocationSource::FromServer) { diff --git a/td/telegram/files/FileManager.h b/td/telegram/files/FileManager.h index 351ea0051..c9bd2d3f3 100644 --- a/td/telegram/files/FileManager.h +++ b/td/telegram/files/FileManager.h @@ -378,8 +378,7 @@ class FileManager : public FileLoadManager::Callback { struct RemoteInfo { FullRemoteFileLocation remote_; - FileId file_id; - FileLocationSource source_; + FileId file_id_; bool operator==(const RemoteInfo &other) const { return this->remote_ == other.remote_; }