diff options
Diffstat (limited to 'protocols/SkypeWeb/src/skype_db.cpp')
-rw-r--r-- | protocols/SkypeWeb/src/skype_db.cpp | 12 |
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
|