diff options
author | George Hazan <george.hazan@gmail.com> | 2025-02-02 19:51:35 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2025-02-02 19:51:35 +0300 |
commit | e69b5b2a3a758022c48179c86fa5a5d246aabeba (patch) | |
tree | 277ed48b3409cd1dd3067ab9eb3b98cfad6ff463 /protocols/Telegram/src/server.cpp | |
parent | 9816616930533590a2884ee2758d71593d86d22b (diff) |
Telegram:
- fix for the forums with more than 100 threads;
- fix for the files receiving in threads
Diffstat (limited to 'protocols/Telegram/src/server.cpp')
-rw-r--r-- | protocols/Telegram/src/server.cpp | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/protocols/Telegram/src/server.cpp b/protocols/Telegram/src/server.cpp index b8206f8a39..9e7974035f 100644 --- a/protocols/Telegram/src/server.cpp +++ b/protocols/Telegram/src/server.cpp @@ -607,7 +607,7 @@ void CTelegramProto::ProcessChat(TD::updateNewChat *pObj) if (hContact != INVALID_CONTACT_ID) {
if (pUser->isForum) {
pUser->wszNick = Utf2T(szTitle.c_str());
- SendQuery(new TD::getForumTopics(pUser->chatId, "", 0, 0, 0, 100));
+ SendQuery(new TD::getForumTopics(pUser->chatId, "", 0, 0, 0, 100), &CTelegramProto::OnGetTopics, pUser);
}
else GcChangeTopic(pUser, szTitle);
}
@@ -972,13 +972,7 @@ void CTelegramProto::ProcessMessage(const TD::message *pMessage) Contact::RemoveFromList(pUser->hContact);
}
- MCONTACT hContact = GetRealContact(pUser);
- if (pMessage->message_thread_id_) {
- wchar_t buf[100];
- mir_snwprintf(buf, L"%lld_%lld", pMessage->chat_id_, pMessage->message_thread_id_);
- if (auto *si = Chat_Find(buf, m_szModuleName))
- hContact = si->hContact;
- }
+ MCONTACT hContact = GetRealContact(pUser, pMessage->message_thread_id_);
if (m_bResidentChannels && pUser->isChannel && pUser->m_si) {
GCEVENT gce = { pUser->m_si, GC_EVENT_MESSAGE };
|