diff options
author | George Hazan <george.hazan@gmail.com> | 2024-09-16 20:34:22 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2024-09-16 20:34:22 +0300 |
commit | 255f3c1a291adbc5156177da47bff1961a381c9f (patch) | |
tree | ec731e3f14a9c7dbcbbd3e70772f1352ef7efb94 /protocols/Telegram | |
parent | 768c0eb243e3bd89d97152bbb178262c69b62b93 (diff) |
fixes #4658 (Имя чата в заголовке окна сообщений никогда не меняется)
Diffstat (limited to 'protocols/Telegram')
-rw-r--r-- | protocols/Telegram/src/utils.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/protocols/Telegram/src/utils.cpp b/protocols/Telegram/src/utils.cpp index 0a1337da68..22055f305a 100644 --- a/protocols/Telegram/src/utils.cpp +++ b/protocols/Telegram/src/utils.cpp @@ -599,8 +599,12 @@ CMStringA CTelegramProto::GetMessageText(TG_USER *pUser, const TD::message *pMsg break;
case TD::messageChatChangeTitle::ID:
- if (auto *pDoc = (TD::messageChatChangeTitle *)pBody)
- setUString(pUser->hContact, "Nick", pDoc->title_.c_str());
+ if (auto *pDoc = (TD::messageChatChangeTitle *)pBody) {
+ if (pUser->m_si)
+ Chat_ChangeSessionName(pUser->m_si, Utf2T(pDoc->title_.c_str()));
+ else
+ setUString(pUser->hContact, "Nick", pDoc->title_.c_str());
+ }
break;
case TD::messagePhoto::ID:
|