diff options
author | George Hazan <george.hazan@gmail.com> | 2024-08-22 15:06:54 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2024-08-22 15:06:54 +0300 |
commit | fdd4c3464bad72ca3b18b013fea6300b3233be2b (patch) | |
tree | a6a8cf654acec926dc7b5c635105c5020f7e12b6 /protocols/SkypeWeb/src/skype_chatrooms.cpp | |
parent | 906a9d5f75f282a1ddd683f29346041c8f73e511 (diff) |
fixes #4580 (Skypeweb: дабл-клик в клисте на групчат, который в оффлайне, работает неправильно)
Diffstat (limited to 'protocols/SkypeWeb/src/skype_chatrooms.cpp')
-rw-r--r-- | protocols/SkypeWeb/src/skype_chatrooms.cpp | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/protocols/SkypeWeb/src/skype_chatrooms.cpp b/protocols/SkypeWeb/src/skype_chatrooms.cpp index e3249b18e3..0f04ba1793 100644 --- a/protocols/SkypeWeb/src/skype_chatrooms.cpp +++ b/protocols/SkypeWeb/src/skype_chatrooms.cpp @@ -33,15 +33,22 @@ void CSkypeProto::InitGroupChatModule() CreateProtoService(PS_LEAVECHAT, &CSkypeProto::OnLeaveChatRoom);
}
-SESSION_INFO* CSkypeProto::StartChatRoom(const wchar_t *tid, const wchar_t *tname)
+SESSION_INFO* CSkypeProto::StartChatRoom(const wchar_t *tid, const wchar_t *tname, const char *pszVersion)
{
// Create the group chat session
SESSION_INFO *si = Chat_NewSession(GCW_CHATROOM, m_szModuleName, tid, tname);
if (!si)
return nullptr;
- if (si->arUsers.getCount() == 0) {
- // Create a user statuses
+ bool bFetchInfo = si->arUsers.getCount() == 0;
+ if (pszVersion) {
+ CMStringA oldVersion(getMStringA(si->hContact, "Version"));
+ if (oldVersion != pszVersion)
+ bFetchInfo = true;
+ }
+
+ if (bFetchInfo) {
+ // Create user statuses
Chat_AddGroup(si, TranslateT("Admin"));
Chat_AddGroup(si, TranslateT("User"));
@@ -368,6 +375,8 @@ void CSkypeProto::OnGetChatInfo(MHttpResponse *response, AsyncHttpRequest*) if (si == nullptr)
return;
+ setString(si->hContact, "Version", root["version"].as_string().c_str());
+
OBJLIST<char> arIds(1);
for (auto &member : root["members"]) {
CMStringW username(UrlToSkypeId(member["userLink"].as_mstring()));
|