From 04da76c5fae4f4ef3eda995641b0251671d6edd0 Mon Sep 17 00:00:00 2001 From: Alexander Lantsev Date: Sat, 4 Apr 2015 22:00:18 +0000 Subject: SkypeWeb: support of actions (/me ...) git-svn-id: http://svn.miranda-ng.org/main/trunk@12600 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/SkypeWeb/src/skype_poll_processing.cpp | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'protocols/SkypeWeb/src/skype_poll_processing.cpp') diff --git a/protocols/SkypeWeb/src/skype_poll_processing.cpp b/protocols/SkypeWeb/src/skype_poll_processing.cpp index e2f0f6c0de..9f0cc24fa1 100644 --- a/protocols/SkypeWeb/src/skype_poll_processing.cpp +++ b/protocols/SkypeWeb/src/skype_poll_processing.cpp @@ -76,13 +76,13 @@ void CSkypeProto::ProcessUserPresenceRes(JSONNODE *node) void CSkypeProto::ProcessNewMessageRes(JSONNODE *node) { ptrA clientMsgId(mir_t2a(ptrT(json_as_string(json_get(node, "clientmessageid"))))); - ptrA skypeeditedid(mir_t2a(ptrT(json_as_string(json_get(node, "skypeeditedid"))))); - ptrA messagetype(mir_t2a(ptrT(json_as_string(json_get(node, "messagetype"))))); + ptrA skypeEditedId(mir_t2a(ptrT(json_as_string(json_get(node, "skypeeditedid"))))); + ptrA messageType(mir_t2a(ptrT(json_as_string(json_get(node, "messagetype"))))); ptrA from(mir_t2a(ptrT(json_as_string(json_get(node, "from"))))); ptrA content(mir_t2a(ptrT(json_as_string(json_get(node, "content"))))); - TCHAR *composeTime = json_as_string (json_get(node, "composetime")); + ptrT composeTime(json_as_string (json_get(node, "composetime"))); ptrA conversationLink(mir_t2a(ptrT(json_as_string(json_get(node, "conversationLink"))))); - time_t timeStamp = IsoToUnixTime(composeTime); + time_t timestamp = IsoToUnixTime(composeTime); char *convname; if (strstr(conversationLink, "/19:")) { @@ -93,21 +93,22 @@ void CSkypeProto::ProcessNewMessageRes(JSONNODE *node) } else if (strstr(conversationLink, "/8:")) { - if (!mir_strcmpi(messagetype, "Control/Typing")) + if (!mir_strcmpi(messageType, "Control/Typing")) { MCONTACT hContact = GetContact(ContactUrlToName(from)); CallService(MS_PROTO_CONTACTISTYPING, hContact, 5); } - else if (!mir_strcmpi(messagetype, "Control/ClearTyping")) + else if (!mir_strcmpi(messageType, "Control/ClearTyping")) { MCONTACT hContact = GetContact(ContactUrlToName(from)); CallService(MS_PROTO_CONTACTISTYPING, hContact, 0); } - else if (!mir_strcmpi(messagetype, "Text") || !mir_strcmpi(messagetype, "RichText")) + else if (!mir_strcmpi(messageType, "Text") || !mir_strcmpi(messageType, "RichText")) { - OnReceiveMessage(from, conversationLink, timeStamp, content); + int emoteOffset = json_as_int(json_get(node, "skypeemoteoffset")); + OnReceiveMessage(clientMsgId, from, conversationLink, timestamp, content, emoteOffset); } - else if (!mir_strcmpi(messagetype, "Event/SkypeVideoMessage")) + else if (!mir_strcmpi(messageType, "Event/SkypeVideoMessage")) { return; //not supported } -- cgit v1.2.3