From b0f39d6de48a41d6fcf2d250b479d1a42954f84e Mon Sep 17 00:00:00 2001 From: MikalaiR Date: Sat, 18 Apr 2015 08:16:29 +0000 Subject: SkypeWeb: Chats support part 2.4. git-svn-id: http://svn.miranda-ng.org/main/trunk@12904 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/SkypeWeb/src/skype_chatrooms.cpp | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/protocols/SkypeWeb/src/skype_chatrooms.cpp b/protocols/SkypeWeb/src/skype_chatrooms.cpp index f58c7a291f..0ad4479dc8 100644 --- a/protocols/SkypeWeb/src/skype_chatrooms.cpp +++ b/protocols/SkypeWeb/src/skype_chatrooms.cpp @@ -210,11 +210,9 @@ void CSkypeProto::OnChatEvent(JSONNODE *node) HXML xml = xi.parseString(ptrT(mir_a2t(content)), 0, _T("addmember")); if (xml != NULL) { - HXML node = xi.getChildByPath(xml, _T("initiator"), 0); - xinitiator = node != NULL ? mir_t2a(xi.getText(node)) : NULL; - node = xi.getChildByPath(xml, _T("target"), 0); - xtarget = node != NULL ? mir_t2a(xi.getText(node)) : NULL; + HXML xmlNode = xi.getChildByPath(xml, _T("target"), 0); + xtarget = node != NULL ? mir_t2a(xi.getText(xmlNode)) : NULL; xi.destroyNode(xml); } @@ -237,11 +235,11 @@ void CSkypeProto::OnChatEvent(JSONNODE *node) HXML xml = xi.parseString(ptrT(mir_a2t(content)), 0, _T("deletemember")); if (xml != NULL) { - HXML node = xi.getChildByPath(xml, _T("initiator"), 0); - xinitiator = node != NULL ? mir_t2a(xi.getText(node)) : NULL; + HXML xmlNode = xi.getChildByPath(xml, _T("initiator"), 0); + xinitiator = node != NULL ? mir_t2a(xi.getText(xmlNode)) : NULL; - node = xi.getChildByPath(xml, _T("target"), 0); - xtarget = node != NULL ? mir_t2a(xi.getText(node)) : NULL; + xmlNode = xi.getChildByPath(xml, _T("target"), 0); + xtarget = node != NULL ? mir_t2a(xi.getText(xmlNode)) : NULL; xi.destroyNode(xml); } @@ -251,11 +249,8 @@ void CSkypeProto::OnChatEvent(JSONNODE *node) target = ParseUrl(xtarget, "8:"); bool isKick = false; - if (xinitiator != NULL) - { - initiator = ParseUrl(xinitiator, "8:"); - isKick = true; - } + initiator = ParseUrl(xinitiator, "8:"); + isKick = true; if (isKick) { -- cgit v1.2.3