diff options
author | George Hazan <george.hazan@gmail.com> | 2023-11-26 19:27:50 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2023-11-26 19:27:50 +0300 |
commit | 291fe560dcd9e1aaf89e269f10cf3cec87cf4861 (patch) | |
tree | 1de2e30377909b98ffe7aa7b56a6b66815671da8 /protocols/Telegram/src/proto.cpp | |
parent | 28e1fda20433c9629ba13adfbd53a81d5baf9011 (diff) |
fixes #3954 completely
Diffstat (limited to 'protocols/Telegram/src/proto.cpp')
-rw-r--r-- | protocols/Telegram/src/proto.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/protocols/Telegram/src/proto.cpp b/protocols/Telegram/src/proto.cpp index 79694ac08c..0e5accd74c 100644 --- a/protocols/Telegram/src/proto.cpp +++ b/protocols/Telegram/src/proto.cpp @@ -458,6 +458,7 @@ void CTelegramProto::ProcessFileMessage(TG_FILE_REQUEST *ft, const TD::message * else { ft->m_szUserId = szUserId; ft->m_uniqueId = szMsgId; + ProtoBroadcastAck(ft->m_hContact, ACKTYPE_FILE, ACKRESULT_SUCCESS, ft); } } } @@ -466,8 +467,10 @@ void CTelegramProto::OnSendFile(td::ClientManager::Response &response, void *pUs { auto *ft = (TG_FILE_REQUEST *)pUserInfo; - if (response.object->get_id() == TD::message::ID) + if (response.object->get_id() == TD::message::ID) { ProcessFileMessage(ft, (TD::message *)response.object.get(), false); + ProtoBroadcastAck(ft->m_hContact, ACKTYPE_FILE, ACKRESULT_SUCCESS, ft); + } else if (response.object->get_id() == TD::messages::ID) { int i = 0; auto *pMessages = (TD::messages *)response.object.get(); @@ -477,7 +480,6 @@ void CTelegramProto::OnSendFile(td::ClientManager::Response &response, void *pUs } } - ProtoBroadcastAck(ft->m_hContact, ACKTYPE_FILE, ACKRESULT_SUCCESS, ft); delete ft; } |