summaryrefslogtreecommitdiff
path: root/protocols
diff options
context:
space:
mode:
authorMikalaiR <nikolay.romanovich@narod.ru>2015-04-21 12:37:09 +0000
committerMikalaiR <nikolay.romanovich@narod.ru>2015-04-21 12:37:09 +0000
commit7ef51f4d1e0209fb54faf18f7ad7c8349090bebd (patch)
tree2a1b1b86a52774fafd46a73a3590ed9306ae04e6 /protocols
parenta66c0e42361082de91f26357d877b67bb798eeb9 (diff)
SkypeWeb: Chat creating part 3.
git-svn-id: http://svn.miranda-ng.org/main/trunk@13007 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols')
-rw-r--r--protocols/SkypeWeb/src/skype_chatrooms.cpp15
1 files changed, 5 insertions, 10 deletions
diff --git a/protocols/SkypeWeb/src/skype_chatrooms.cpp b/protocols/SkypeWeb/src/skype_chatrooms.cpp
index 9b915c81aa..3123c3cc50 100644
--- a/protocols/SkypeWeb/src/skype_chatrooms.cpp
+++ b/protocols/SkypeWeb/src/skype_chatrooms.cpp
@@ -315,6 +315,8 @@ void CSkypeProto::OnChatEvent(JSONNODE *node)
target = ParseUrl(xtarget, "8:");
+ if (FindChatRoom(chatname) == NULL) StartChatRoom(_A2T(chatname), topic);
+
AddChatContact(_A2T(chatname), target, target, L"User");
}
else if (!mir_strcmpi(messageType, "ThreadActivity/DeleteMember"))
@@ -632,15 +634,15 @@ INT_PTR CSkypeProto::GcCreateDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR
if (int hItem = SendMessage(hwndClist, CLM_FINDCONTACT, hContact, 0)) {
if (SendMessage(hwndClist, CLM_GETCHECKMARK, (WPARAM)hItem, 0)) {
- ptrA uid(db_get_sa(hContact, ppro->m_szModuleName, SKYPE_SETTINGS_ID));
- uids.insert(uid);
+ uids.insert(db_get_sa(hContact, ppro->m_szModuleName, SKYPE_SETTINGS_ID));
}
}
}
+ uids.insert(ppro->getStringA(SKYPE_SETTINGS_ID));
TCHAR tszTitle[1024];
GetDlgItemText(hwndDlg, IDC_TITLE, tszTitle, SIZEOF(tszTitle));
- ppro->CreateNewChat(uids, tszTitle);
+ ppro->SendRequest(new CreateChatroomRequest(ppro->RegToken, uids, ppro->getStringA(SKYPE_SETTINGS_ID), ppro->Server));
for (int i = 0; i < uids.getCount(); i++)
mir_free(uids[i]);
uids.destroy();
@@ -649,11 +651,4 @@ INT_PTR CSkypeProto::GcCreateDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR
}
}
return FALSE;
-}
-
-void CSkypeProto::CreateNewChat(LIST<char> &uids, LPCTSTR ptszTitle)
-{
- if (!IsOnline())
- return;
- SendRequest(new CreateChatroomRequest(RegToken, uids, m_szModuleName, Server));
} \ No newline at end of file