summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--protocols/Telegram/src/groupchat.cpp11
1 files 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;