diff options
author | George Hazan <george.hazan@gmail.com> | 2024-02-05 14:26:57 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2024-02-05 14:26:57 +0300 |
commit | d980bcb6bf63496bf2231e4f7eb17087cc0b2d9f (patch) | |
tree | a4399fc481a892e9c4f8c10a8efabd67cbd25990 /protocols | |
parent | 92937e4817268a029cc2446b74319a0d29025ed2 (diff) |
fixes #3963 (Telegram: не удаётся скачать исходящую картинку, если файл стёрт)
Diffstat (limited to 'protocols')
-rw-r--r-- | protocols/Telegram/src/proto.cpp | 2 | ||||
-rw-r--r-- | protocols/Telegram/src/utils.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/protocols/Telegram/src/proto.cpp b/protocols/Telegram/src/proto.cpp index a473ffaee2..2c5e515a2f 100644 --- a/protocols/Telegram/src/proto.cpp +++ b/protocols/Telegram/src/proto.cpp @@ -218,7 +218,7 @@ void CTelegramProto::OnErase() void CTelegramProto::OnEventDeleted(MCONTACT hContact, MEVENT hDbEvent, int flags) { - if (!hContact || !(flags & CDF_FROM_SERVER)) + if (!hContact || (flags & CDF_FROM_SERVER) != 0) return; auto *pUser = FindUser(GetId(hContact)); diff --git a/protocols/Telegram/src/utils.cpp b/protocols/Telegram/src/utils.cpp index af638e1d11..8a4ef0dc0e 100644 --- a/protocols/Telegram/src/utils.cpp +++ b/protocols/Telegram/src/utils.cpp @@ -395,7 +395,7 @@ bool CTelegramProto::GetMessageFile( auto *pRequest = new TG_FILE_REQUEST(fileType, pFile->id_, pFile->remote_->id_.c_str());
pRequest->m_fileName = Utf2T(pszFileName);
pRequest->m_fileSize = pFile->size_;
- pRequest->m_bRecv = true;
+ pRequest->m_bRecv = !pMsg->is_outgoing_;
{
mir_cslock lck(m_csFiles);
m_arFiles.insert(pRequest);
|