From b538ebf8e9609a4e6413d48049db1360943c5c41 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 7 Apr 2024 21:30:32 +0300 Subject: =?UTF-8?q?fixes=20#4330=20(Telegram:=20=D1=80=D0=B5=D0=BF=D0=BB?= =?UTF-8?q?=D0=B0=D0=B8=20=D0=BF=D0=BE=D0=B4=D0=B3=D1=80=D1=83=D0=B6=D0=B0?= =?UTF-8?q?=D1=8E=D1=82=D1=81=D1=8F=20=D1=81=20=D1=81=D0=B5=D1=80=D0=B2?= =?UTF-8?q?=D0=B5=D1=80=D0=B0=20=D0=BA=D0=B0=D0=BA=20=D0=BE=D0=B1=D1=8B?= =?UTF-8?q?=D1=87=D0=BD=D1=8B=D0=B5=20=D1=81=D0=BE=D0=BE=D0=B1=D1=89=D0=B5?= =?UTF-8?q?=D0=BD=D0=B8=D1=8F)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- protocols/Telegram/src/server.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'protocols/Telegram/src') 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); } -- cgit v1.2.3