From 9ea1fabf1643f117b46ee44d359084fe77bfd4f2 Mon Sep 17 00:00:00 2001 From: MikalaiR Date: Fri, 24 Jul 2015 11:48:01 +0000 Subject: SkypeWeb: More fixes. git-svn-id: http://svn.miranda-ng.org/main/trunk@14675 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/SkypeWeb/src/skype_db.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'protocols/SkypeWeb/src/skype_db.cpp') diff --git a/protocols/SkypeWeb/src/skype_db.cpp b/protocols/SkypeWeb/src/skype_db.cpp index b987cb9343..478de25527 100644 --- a/protocols/SkypeWeb/src/skype_db.cpp +++ b/protocols/SkypeWeb/src/skype_db.cpp @@ -73,13 +73,21 @@ MEVENT CSkypeProto::AppendDBEvent(MCONTACT hContact, MEVENT hEvent, const char * JSONNode jMsg = JSONNode::parse((char*)dbei.pBlob); if (jMsg) { - if (jMsg["edits"]) + JSONNode &jEdits = jMsg["edits"]; + if (jEdits) { + for (auto it = jEdits.begin(); it != jEdits.end(); ++it) + { + const JSONNode &jEdit = *it; + + if (jEdit["time"].as_int() == edit_time) + return hEvent; + } JSONNode jEdit; jEdit.push_back(JSONNode("time", (long)edit_time)); jEdit.push_back(JSONNode("text", szContent)); - jMsg["edits"].push_back(jEdit); + jEdits.push_back(jEdit); } } else -- cgit v1.2.3