diff options
Diffstat (limited to 'protocols/Telegram/tdlib/td/td/telegram/files/FileHashUploader.cpp')
-rw-r--r-- | protocols/Telegram/tdlib/td/td/telegram/files/FileHashUploader.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/protocols/Telegram/tdlib/td/td/telegram/files/FileHashUploader.cpp b/protocols/Telegram/tdlib/td/td/telegram/files/FileHashUploader.cpp index 75427bbbb1..5357bfaf38 100644 --- a/protocols/Telegram/tdlib/td/td/telegram/files/FileHashUploader.cpp +++ b/protocols/Telegram/tdlib/td/td/telegram/files/FileHashUploader.cpp @@ -1,5 +1,5 @@ // -// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2022 +// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2023 // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -68,7 +68,7 @@ Status FileHashUploader::loop_impl() { if (state_ == State::NetRequest) { // messages.getDocumentByHash#338e2464 sha256:bytes size:long mime_type:string = Document; auto hash = BufferSlice(32); - sha256_state_.extract(hash.as_slice(), true); + sha256_state_.extract(hash.as_mutable_slice(), true); auto mime_type = MimeType::from_extension(PathView(local_.path_).extension(), "image/gif"); auto query = telegram_api::messages_getDocumentByHash(std::move(hash), size_, std::move(mime_type)); LOG(INFO) << "Send getDocumentByHash request: " << to_string(query); |