From 4d7709c7b8fc466d21158670bb94aaea23ecb2e5 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 6 Mar 2015 15:58:41 +0000 Subject: fix for the wrong date formatting git-svn-id: http://svn.miranda-ng.org/main/trunk@12351 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/WhatsApp/src/WhatsAPI++/WAConnection.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'protocols/WhatsApp/src/WhatsAPI++/WAConnection.cpp') diff --git a/protocols/WhatsApp/src/WhatsAPI++/WAConnection.cpp b/protocols/WhatsApp/src/WhatsAPI++/WAConnection.cpp index 6052c768bc..a14b576f14 100644 --- a/protocols/WhatsApp/src/WhatsAPI++/WAConnection.cpp +++ b/protocols/WhatsApp/src/WhatsAPI++/WAConnection.cpp @@ -586,13 +586,11 @@ void WAConnection::parsePresense(ProtocolTreeNode *node) throw(WAException) return; } - const string &type = node->getAttributeValue("type"); - if (type == "unavailable") { - if (m_pEventHandler != NULL) + if (m_pEventHandler != NULL) { + const string &type = node->getAttributeValue("type"); + if (type == "unavailable") m_pEventHandler->onAvailable(from, false); - } - else if (type == "available" || type == "") { - if (m_pEventHandler != NULL) + else if (type == "available" || type == "") m_pEventHandler->onAvailable(from, true); } } -- cgit v1.2.3