From 54efd8968c7990f17678ad9b823c1a6e71ad91bb Mon Sep 17 00:00:00 2001 From: MikalaiR Date: Fri, 17 Apr 2015 14:33:52 +0000 Subject: SkypeWeb: Chat fixes. git-svn-id: http://svn.miranda-ng.org/main/trunk@12890 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/SkypeWeb/src/skype_chatrooms.cpp | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 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 dee5b12629..8f629d0d5a 100644 --- a/protocols/SkypeWeb/src/skype_chatrooms.cpp +++ b/protocols/SkypeWeb/src/skype_chatrooms.cpp @@ -206,20 +206,21 @@ void CSkypeProto::OnChatEvent(JSONNODE *node) } else if (!mir_strcmpi(messageType, "ThreadActivity/AddMember")) { - ptrA initiator, target; + ptrA xinitiator, xtarget, initiator, target; //content = 14291862291648:initiator8:user HXML xml = xi.parseString(ptrT(mir_a2t(content)), 0, _T("addmember")); if (xml != NULL) { HXML node = xi.getChildByPath(xml, _T("initiator"), 0); - initiator = node != NULL ? mir_t2a(xi.getText(node)) : NULL; + xinitiator = node != NULL ? mir_t2a(xi.getText(node)) : NULL; node = xi.getChildByPath(xml, _T("target"), 0); - target = node != NULL ? mir_t2a(xi.getText(node)) : NULL; + xtarget = node != NULL ? mir_t2a(xi.getText(node)) : NULL; xi.destroyNode(xml); } + target = ParseUrl(xtarget, "8:"); GCDEST gcd = { m_szModuleName, ptrT(mir_a2t(chatname)), GC_EVENT_JOIN }; GCEVENT gce = { sizeof(GCEVENT), &gcd }; @@ -232,23 +233,30 @@ void CSkypeProto::OnChatEvent(JSONNODE *node) } else if (!mir_strcmpi(messageType, "ThreadActivity/DeleteMember")) { - ptrA initiator, target; + ptrA xinitiator, xtarget, initiator, target; //content = 14291862291648:initiator8:user HXML xml = xi.parseString(ptrT(mir_a2t(content)), 0, _T("deletemember")); if (xml != NULL) { HXML node = xi.getChildByPath(xml, _T("initiator"), 0); - initiator = node != NULL ? mir_t2a(xi.getText(node)) : NULL; + xinitiator = node != NULL ? mir_t2a(xi.getText(node)) : NULL; node = xi.getChildByPath(xml, _T("target"), 0); - target = node != NULL ? mir_t2a(xi.getText(node)) : NULL; + xtarget = node != NULL ? mir_t2a(xi.getText(node)) : NULL; xi.destroyNode(xml); } + if(xtarget == NULL) + return; + + target = ParseUrl(xtarget, "8:"); bool isKick = false; - if (initiator != NULL) - bool isKick = true; + if (xinitiator != NULL) + { + initiator = ParseUrl(xinitiator, "8:"); + isKick = true; + } if (isKick) { -- cgit v1.2.3