diff options
Diffstat (limited to 'protocols/Telegram/src')
-rw-r--r-- | protocols/Telegram/src/server.cpp | 10 |
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)
|