summaryrefslogtreecommitdiff
path: root/protocols/Telegram/src
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2025-06-26 20:05:07 +0300
committerGeorge Hazan <george.hazan@gmail.com>2025-06-26 20:05:07 +0300
commitef38bb661a3de439ea02d42360a972b0d8062c85 (patch)
treee56cca8a90b87b3f05b17f0ea981ad76d56dc481 /protocols/Telegram/src
parent7e72109d87f7c6136ba9c072409aec4d6d9540f4 (diff)
fixes #5052 (Telegram: при первом входе подтянулись не все приваты)
Diffstat (limited to 'protocols/Telegram/src')
-rw-r--r--protocols/Telegram/src/server.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/protocols/Telegram/src/server.cpp b/protocols/Telegram/src/server.cpp
index 209fefd70e..82e7225f01 100644
--- a/protocols/Telegram/src/server.cpp
+++ b/protocols/Telegram/src/server.cpp
@@ -613,6 +613,7 @@ void CTelegramProto::ProcessChat(TD::updateNewChat *pObj)
if (!m_arChats.find(pUser))
m_arChats.insert(pUser);
+ // small or super group
if (!szTitle.empty()) {
if (hContact != INVALID_CONTACT_ID) {
if (pUser->isForum) {
@@ -643,6 +644,15 @@ void CTelegramProto::ProcessChat(TD::updateNewChat *pObj)
if (pUser->isGroupChat && pUser->m_si == nullptr)
InitGroupChat(pUser, (pUser->isForum) ? TranslateT("General") : Utf2T(pChat->title_.c_str()));
}
+ else if (!pUser->isGroupChat) {
+ pUser = AddUser(pChat->id_, false);
+ hContact = pUser->hContact;
+ setWString(hContact, "Nick", pUser->wszNick);
+ if (!pUser->wszFirstName.IsEmpty())
+ setWString(hContact, "FirstName", pUser->wszFirstName);
+ if (!pUser->wszLastName.IsEmpty())
+ setWString(hContact, "LastName", pUser->wszLastName);
+ }
}
void CTelegramProto::ProcessChatAction(TD::updateChatAction *pObj)