From f9eaf501b081f7e6065ecc1fb695ae842ba36e03 Mon Sep 17 00:00:00 2001 From: MikalaiR Date: Sun, 19 Apr 2015 07:48:48 +0000 Subject: SkypeWeb: Fix(?) duplicate messages. git-svn-id: http://svn.miranda-ng.org/main/trunk@12927 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/SkypeWeb/src/skype_poll_processing.cpp | 51 +----------------------- 1 file changed, 1 insertion(+), 50 deletions(-) (limited to 'protocols/SkypeWeb/src') diff --git a/protocols/SkypeWeb/src/skype_poll_processing.cpp b/protocols/SkypeWeb/src/skype_poll_processing.cpp index 878a593435..aca963e369 100644 --- a/protocols/SkypeWeb/src/skype_poll_processing.cpp +++ b/protocols/SkypeWeb/src/skype_poll_processing.cpp @@ -102,56 +102,7 @@ void CSkypeProto::ProcessNewMessageRes(JSONNODE *node) void CSkypeProto::ProcessConversationUpdateRes(JSONNODE *node) { - debugLogA("CSkypeProto::ProcessNewMessageRes"); - JSONNODE *lastmsg = json_get(node, "lastMessage"); - - ptrA clientMsgId(mir_t2a(ptrT(json_as_string(json_get(lastmsg, "clientmessageid"))))); - ptrA skypeEditedId(mir_t2a(ptrT(json_as_string(json_get(lastmsg, "skypeeditedid"))))); - ptrA messageType(mir_t2a(ptrT(json_as_string(json_get(lastmsg, "messagetype"))))); - ptrA from(mir_t2a(ptrT(json_as_string(json_get(lastmsg, "from"))))); - ptrA content(mir_t2a(ptrT(json_as_string(json_get(lastmsg, "content"))))); - ptrT composeTime(json_as_string(json_get(lastmsg, "composetime"))); - ptrA conversationLink(mir_t2a(ptrT(json_as_string(json_get(lastmsg, "conversationLink"))))); - ptrA type(mir_t2a(ptrT(json_as_string(json_get(node, "type"))))); - time_t timestamp = IsoToUnixTime(composeTime); - - if (strstr(conversationLink, "/8:")) - { - if (!mir_strcmpi(type, "Message")) - { - ptrA skypename(ContactUrlToName(from)); - MCONTACT hContact = FindContact(skypename); - - if (hContact == NULL && !IsMe(skypename)) - hContact = AddContact(skypename, true); - - if (!mir_strcmpi(messageType, "Control/Typing")) - { - CallService(MS_PROTO_CONTACTISTYPING, hContact, 5); - } - else if (!mir_strcmpi(messageType, "Control/ClearTyping")) - { - CallService(MS_PROTO_CONTACTISTYPING, hContact, 0); - } - else if (!mir_strcmpi(messageType, "Text") || !mir_strcmpi(messageType, "RichText")) - { - int emoteOffset = json_as_int(json_get(node, "skypeemoteoffset")); - if (IsMe(skypename)) - { - hContact = FindContact(ptrA(ContactUrlToName(conversationLink))); - int hMessage = atoi(clientMsgId); - ProtoBroadcastAck(hContact, ACKTYPE_MESSAGE, ACKRESULT_SUCCESS, (HANDLE)hMessage, 0); - AddMessageToDb(hContact, timestamp, DBEF_UTF | DBEF_SENT, clientMsgId, &content[emoteOffset], emoteOffset); - return; - } - OnReceiveMessage(clientMsgId, from, timestamp, content, emoteOffset); - } - else if (!mir_strcmpi(messageType, "Event/SkypeVideoMessage")) - { - return; //not supported - } - } - } + return; //it should be rewritten } void CSkypeProto::ProcessThreadUpdateRes(JSONNODE *node) -- cgit v1.2.3