diff options
author | George Hazan <george.hazan@gmail.com> | 2025-03-16 16:11:59 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2025-03-16 16:11:59 +0300 |
commit | 15ffd428da97b583f827c5fc0caf180b0510ce05 (patch) | |
tree | 72a5bbdaa856c23f1650babac2966747172bf087 /protocols/Telegram/src | |
parent | 3c480b710d82afa7bb4361aa7c7887cecbc62138 (diff) |
fixes #4920 ([Telegram] Events are not marked as read)
Diffstat (limited to 'protocols/Telegram/src')
-rw-r--r-- | protocols/Telegram/src/server.cpp | 2 | ||||
-rw-r--r-- | protocols/Telegram/src/utils.cpp | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/protocols/Telegram/src/server.cpp b/protocols/Telegram/src/server.cpp index ac7d72562d..20d55e04a9 100644 --- a/protocols/Telegram/src/server.cpp +++ b/protocols/Telegram/src/server.cpp @@ -998,7 +998,7 @@ void CTelegramProto::ProcessMessage(const TD::message *pMessage) dbei.cbBlob = szText.GetLength();
dbei.iTimestamp = pMessage->date_;
if (pMessage->is_outgoing_)
- dbei.flags |= DBEF_SENT;
+ dbei.flags |= DBEF_SENT | DBEF_READ;
if (!pUser->bInited)
dbei.flags |= DBEF_READ;
if (GetGcUserId(pUser, pMessage, szUserId))
diff --git a/protocols/Telegram/src/utils.cpp b/protocols/Telegram/src/utils.cpp index 839da0fcfb..c266b9dd55 100644 --- a/protocols/Telegram/src/utils.cpp +++ b/protocols/Telegram/src/utils.cpp @@ -239,7 +239,7 @@ void CTelegramProto::MarkRead(MCONTACT hContact, const CMStringA &szMaxId, bool if (dbei.bSent != bSent)
continue;
- if (!dbei.markedRead())
+ if (!dbei.bRead)
db_event_markRead(hContact, hEvent, true);
}
}
@@ -497,7 +497,7 @@ bool CTelegramProto::GetMessageFile(const EmbeddedFile &F, TG_FILE_REQUEST::Type dbei.szId = F.pszId;
dbei.szUserId = F.pszUser;
if (F.pMsg->is_outgoing_)
- dbei.flags |= DBEF_SENT;
+ dbei.flags |= DBEF_SENT | DBEF_READ;
if (!F.pUser->bInited || F.bRead)
dbei.flags |= DBEF_READ;
if (auto iReplyId = getReplyId(F.pMsg->reply_to_.get())) {
|