summaryrefslogtreecommitdiff
path: root/protocols/Telegram
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2023-07-29 21:24:49 +0300
committerGeorge Hazan <george.hazan@gmail.com>2023-07-29 21:24:49 +0300
commita770c8ead7594b589b3557a4cc97c6bc75badf07 (patch)
treedb71a4dce4cda735c72bf2b637d72b255191dc9f /protocols/Telegram
parent26686176cf3c08411c91dbb25f3973ab2a874722 (diff)
Telegram: we don't mark file transfers read automatically, only for channels
Diffstat (limited to 'protocols/Telegram')
-rw-r--r--protocols/Telegram/src/utils.cpp7
1 files changed, 5 insertions, 2 deletions
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;
}