diff options
author | George Hazan <ghazan@miranda.im> | 2023-03-14 14:37:39 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2023-03-14 14:37:39 +0300 |
commit | 2296a0167f5f3f2c51e02bf9201e8b50fb67bd76 (patch) | |
tree | 51dd01bf5e77c558be9a5e63d1eae3bf99b20382 /protocols/ICQ-WIM/src | |
parent | 17407bbf6ccf9f45e2f2acf26dd71aefb5b1ea7e (diff) |
fixes #3427 (ICQ: у групчатов теперь ID вместо имени)
Diffstat (limited to 'protocols/ICQ-WIM/src')
-rw-r--r-- | protocols/ICQ-WIM/src/poll.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/protocols/ICQ-WIM/src/poll.cpp b/protocols/ICQ-WIM/src/poll.cpp index fe344a8ccc..9b1e5aae92 100644 --- a/protocols/ICQ-WIM/src/poll.cpp +++ b/protocols/ICQ-WIM/src/poll.cpp @@ -168,9 +168,17 @@ void CIcqProto::ProcessHistData(const JSONNode &ev) if (IsChat(wszId)) {
SESSION_INFO *si = Chat_Find(wszId, m_szModuleName);
- if (si == nullptr)
- if ((si = CreateGroupChat(wszId, L"")) == nullptr)
+ if (si == nullptr) {
+ CMStringW wszNick;
+ for (auto &it : ev["persons"])
+ if (it["sn"].as_mstring() == wszId) {
+ wszNick = it["friendly"].as_mstring();
+ break;
+ }
+
+ if ((si = CreateGroupChat(wszId, wszNick)) == nullptr)
return;
+ }
hContact = si->hContact;
|