From ef38bb661a3de439ea02d42360a972b0d8062c85 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 26 Jun 2025 20:05:07 +0300 Subject: =?UTF-8?q?fixes=20#5052=20(Telegram:=20=D0=BF=D1=80=D0=B8=20?= =?UTF-8?q?=D0=BF=D0=B5=D1=80=D0=B2=D0=BE=D0=BC=20=D0=B2=D1=85=D0=BE=D0=B4?= =?UTF-8?q?=D0=B5=20=D0=BF=D0=BE=D0=B4=D1=82=D1=8F=D0=BD=D1=83=D0=BB=D0=B8?= =?UTF-8?q?=D1=81=D1=8C=20=D0=BD=D0=B5=20=D0=B2=D1=81=D0=B5=20=D0=BF=D1=80?= =?UTF-8?q?=D0=B8=D0=B2=D0=B0=D1=82=D1=8B)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- protocols/Telegram/src/server.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'protocols/Telegram/src/server.cpp') 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) -- cgit v1.2.3