diff options
author | MikalaiR <nikolay.romanovich@narod.ru> | 2015-04-19 07:48:48 +0000 |
---|---|---|
committer | MikalaiR <nikolay.romanovich@narod.ru> | 2015-04-19 07:48:48 +0000 |
commit | f9eaf501b081f7e6065ecc1fb695ae842ba36e03 (patch) | |
tree | 47956a5cef1909b93fbfea229dbe163088d3ddc0 | |
parent | 0e78d281be6ce359321346526f9687bab987d9e1 (diff) |
SkypeWeb: Fix(?) duplicate messages.
git-svn-id: http://svn.miranda-ng.org/main/trunk@12927 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r-- | protocols/SkypeWeb/src/skype_poll_processing.cpp | 51 |
1 files changed, 1 insertions, 50 deletions
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)
|