summaryrefslogtreecommitdiff
path: root/protocols
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2024-04-07 21:30:32 +0300
committerGeorge Hazan <george.hazan@gmail.com>2024-04-07 21:30:32 +0300
commitb538ebf8e9609a4e6413d48049db1360943c5c41 (patch)
treefbda924c627656cdac31b746708c2b152bd6749f /protocols
parent9452972b405d16a3f08667654242c06f97c4f672 (diff)
fixes #4330 (Telegram: реплаи подгружаются с сервера как обычные сообщения)
Diffstat (limited to 'protocols')
-rw-r--r--protocols/Telegram/src/server.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/protocols/Telegram/src/server.cpp b/protocols/Telegram/src/server.cpp
index 31a4010983..2b2e1a4e63 100644
--- a/protocols/Telegram/src/server.cpp
+++ b/protocols/Telegram/src/server.cpp
@@ -429,7 +429,7 @@ void CTelegramProto::OnGetHistory(td::ClientManager::Response &response, void *p
if (db_event_getById(m_szModuleName, szMsgId))
continue;
- CMStringA szBody = GetMessageText(pUser, pMsg, true);
+ CMStringA szBody = GetMessageText(pUser, pMsg, true), szReplyId;
if (szBody.IsEmpty())
continue;
@@ -445,6 +445,10 @@ void CTelegramProto::OnGetHistory(td::ClientManager::Response &response, void *p
dbei.flags |= DBEF_SENT;
if (this->GetGcUserId(pUser, pMsg, szUserId))
dbei.szUserId = szUserId;
+ if (pMsg->reply_to_message_id_) {
+ szReplyId = msg2id(pMsg->chat_id_, pMsg->reply_to_message_id_);
+ dbei.szReplyId = szReplyId;
+ }
db_event_add(GetRealContact(pUser), &dbei);
}