From d980bcb6bf63496bf2231e4f7eb17087cc0b2d9f Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 5 Feb 2024 14:26:57 +0300 Subject: [PATCH] =?UTF-8?q?fixes=20#3963=20(Telegram:=20=D0=BD=D0=B5=20?= =?UTF-8?q?=D1=83=D0=B4=D0=B0=D1=91=D1=82=D1=81=D1=8F=20=D1=81=D0=BA=D0=B0?= =?UTF-8?q?=D1=87=D0=B0=D1=82=D1=8C=20=D0=B8=D1=81=D1=85=D0=BE=D0=B4=D1=8F?= =?UTF-8?q?=D1=89=D1=83=D1=8E=20=D0=BA=D0=B0=D1=80=D1=82=D0=B8=D0=BD=D0=BA?= =?UTF-8?q?=D1=83,=20=D0=B5=D1=81=D0=BB=D0=B8=20=D1=84=D0=B0=D0=B9=D0=BB?= =?UTF-8?q?=20=D1=81=D1=82=D1=91=D1=80=D1=82)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- protocols/Telegram/src/proto.cpp | 2 +- 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 a473ffaee29..2c5e515a2f3 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 af638e1d113..8a4ef0dc0e2 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);