summaryrefslogtreecommitdiff
path: root/protocols
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2024-02-05 14:26:57 +0300
committerGeorge Hazan <george.hazan@gmail.com>2024-02-05 14:26:57 +0300
commitd980bcb6bf63496bf2231e4f7eb17087cc0b2d9f (patch)
treea4399fc481a892e9c4f8c10a8efabd67cbd25990 /protocols
parent92937e4817268a029cc2446b74319a0d29025ed2 (diff)
fixes #3963 (Telegram: не удаётся скачать исходящую картинку, если файл стёрт)
Diffstat (limited to 'protocols')
-rw-r--r--protocols/Telegram/src/proto.cpp2
-rw-r--r--protocols/Telegram/src/utils.cpp2
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);