diff options
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()));
|