diff options
author | George Hazan <george.hazan@gmail.com> | 2023-12-04 12:02:22 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2023-12-04 12:02:26 +0300 |
commit | 165883a4f953e96cdd88ef21e5010e4a1ef7d6f2 (patch) | |
tree | 58b087e6b991eb9361a4ab5cb224623455c39197 /protocols/Telegram/src | |
parent | bc577693d6c669690d44433e7036340d77f35b99 (diff) |
Telegram: reply ids for group chats
Diffstat (limited to 'protocols/Telegram/src')
-rw-r--r-- | protocols/Telegram/src/groupchat.cpp | 11 |
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; |