summaryrefslogtreecommitdiff
path: root/protocols/SkypeWeb/src/skype_db.cpp
diff options
context:
space:
mode:
authorMikalaiR <nikolay.romanovich@narod.ru>2015-07-24 11:48:01 +0000
committerMikalaiR <nikolay.romanovich@narod.ru>2015-07-24 11:48:01 +0000
commit9ea1fabf1643f117b46ee44d359084fe77bfd4f2 (patch)
tree44d05a7c93c2416f04db0009e9afc050408955d1 /protocols/SkypeWeb/src/skype_db.cpp
parenta37130550153d51332ddd1996b8d796265c1dc35 (diff)
SkypeWeb: More fixes.
git-svn-id: http://svn.miranda-ng.org/main/trunk@14675 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/SkypeWeb/src/skype_db.cpp')
-rw-r--r--protocols/SkypeWeb/src/skype_db.cpp12
1 files changed, 10 insertions, 2 deletions
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