From fdd4c3464bad72ca3b18b013fea6300b3233be2b Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 22 Aug 2024 15:06:54 +0300 Subject: =?UTF-8?q?fixes=20#4580=20(Skypeweb:=20=D0=B4=D0=B0=D0=B1=D0=BB-?= =?UTF-8?q?=D0=BA=D0=BB=D0=B8=D0=BA=20=D0=B2=20=D0=BA=D0=BB=D0=B8=D1=81?= =?UTF-8?q?=D1=82=D0=B5=20=D0=BD=D0=B0=20=D0=B3=D1=80=D1=83=D0=BF=D1=87?= =?UTF-8?q?=D0=B0=D1=82,=20=D0=BA=D0=BE=D1=82=D0=BE=D1=80=D1=8B=D0=B9=20?= =?UTF-8?q?=D0=B2=20=D0=BE=D1=84=D1=84=D0=BB=D0=B0=D0=B9=D0=BD=D0=B5,=20?= =?UTF-8?q?=D1=80=D0=B0=D0=B1=D0=BE=D1=82=D0=B0=D0=B5=D1=82=20=D0=BD=D0=B5?= =?UTF-8?q?=D0=BF=D1=80=D0=B0=D0=B2=D0=B8=D0=BB=D1=8C=D0=BD=D0=BE)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- protocols/SkypeWeb/src/skype_chatrooms.cpp | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'protocols/SkypeWeb/src/skype_chatrooms.cpp') 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 arIds(1); for (auto &member : root["members"]) { CMStringW username(UrlToSkypeId(member["userLink"].as_mstring())); -- cgit v1.2.3