From 165883a4f953e96cdd88ef21e5010e4a1ef7d6f2 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 4 Dec 2023 12:02:22 +0300 Subject: Telegram: reply ids for group chats --- protocols/Telegram/src/groupchat.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/protocols/Telegram/src/groupchat.cpp b/protocols/Telegram/src/groupchat.cpp index c99302d435..eba04b206d 100644 --- a/protocols/Telegram/src/groupchat.cpp +++ b/protocols/Telegram/src/groupchat.cpp @@ -204,8 +204,15 @@ int CTelegramProto::GcEventHook(WPARAM, LPARAM lParam) if (gch->ptszText && mir_wstrlen(gch->ptszText) > 0) { rtrimw(gch->ptszText); Chat_UnescapeTags(gch->ptszText); - if (auto *pUser = FindUser(userId)) - SendTextMessage(pUser->chatId, 0, T2Utf(gch->ptszText)); + if (auto *pUser = FindUser(userId)) { + TD::int53 replyId = 0; + if (auto *pDlg = gch->si->pDlg) { + DB::EventInfo dbei(pDlg->m_hQuoteEvent, false); + if (dbei) + replyId = dbei2id(dbei); + } + SendTextMessage(pUser->chatId, replyId, T2Utf(gch->ptszText)); + } } break; -- cgit v1.2.3