From a770c8ead7594b589b3557a4cc97c6bc75badf07 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sat, 29 Jul 2023 21:24:49 +0300 Subject: Telegram: we don't mark file transfers read automatically, only for channels --- protocols/Telegram/src/utils.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'protocols/Telegram') diff --git a/protocols/Telegram/src/utils.cpp b/protocols/Telegram/src/utils.cpp index b3d3598c82..40fb649268 100644 --- a/protocols/Telegram/src/utils.cpp +++ b/protocols/Telegram/src/utils.cpp @@ -292,8 +292,9 @@ bool CTelegramProto::GetMessageFile( m_arFiles.insert(pRequest); } + MCONTACT hContact = GetRealContact(pUser); PROTORECVFILE pre = {}; - pre.dwFlags = PRFF_UTF | PRFF_SILENT | PRFF_READ; + pre.dwFlags = PRFF_UTF | PRFF_SILENT; pre.fileCount = 1; pre.timestamp = pMsg->date_; pre.files.a = &pszFileName; @@ -304,7 +305,9 @@ bool CTelegramProto::GetMessageFile( pre.descr.a = caption.c_str(); if (pMsg->is_outgoing_) pre.dwFlags |= PRFF_SENT; - ProtoChainRecvFile(GetRealContact(pUser), &pre); + if (Contact::IsGroupChat(hContact)) + pre.dwFlags |= PRFF_READ; + ProtoChainRecvFile(hContact, &pre); return true; } -- cgit v1.2.3