summaryrefslogtreecommitdiff
path: root/protocols/Telegram/src/proto.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2025-05-08 14:28:21 +0300
committerGeorge Hazan <george.hazan@gmail.com>2025-05-08 14:28:26 +0300
commitf4ef74c6eacbc7fc2d557e4b3b12c9e7b7680dc8 (patch)
treeda0829d54a88696bdf835f721ec4d20b4d74af7b /protocols/Telegram/src/proto.cpp
parentd138a6f54964be25e0377c169ab105f181eff24b (diff)
fixes #5014 (Telegram: "застревает" отправка файлов)
Diffstat (limited to 'protocols/Telegram/src/proto.cpp')
-rw-r--r--protocols/Telegram/src/proto.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/protocols/Telegram/src/proto.cpp b/protocols/Telegram/src/proto.cpp
index 6e59c6c983..a420a65122 100644
--- a/protocols/Telegram/src/proto.cpp
+++ b/protocols/Telegram/src/proto.cpp
@@ -462,6 +462,15 @@ void CTelegramProto::ProcessFileMessage(TG_FILE_REQUEST *ft, const TD::message *
return;
}
+ // if that file was sent once, it might be cached at the server & reused
+ if (auto *pRemote = pFile->remote_.get()) {
+ if (pRemote->is_uploading_completed_) {
+ ProtoBroadcastAck(ft->m_hContact, ACKTYPE_FILE, ACKRESULT_SUCCESS, ft);
+ delete ft;
+ return;
+ }
+ }
+
char szUserId[100];
auto szMsgId(msg2id(pMsg));