summaryrefslogtreecommitdiff
path: root/protocols/SkypeWeb/src
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/SkypeWeb/src')
-rw-r--r--protocols/SkypeWeb/src/skype_db.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/protocols/SkypeWeb/src/skype_db.cpp b/protocols/SkypeWeb/src/skype_db.cpp
index 2dbe2ced90..a74b04793c 100644
--- a/protocols/SkypeWeb/src/skype_db.cpp
+++ b/protocols/SkypeWeb/src/skype_db.cpp
@@ -128,7 +128,11 @@ MEVENT CSkypeProto::AppendDBEvent(MCONTACT hContact, MEVENT hEvent, const char *
}
- db_event_delete(hContact, hEvent);
+ // First force old event to be read, so it won't be stuck forever because of theoretical bug in DB driver
+ db_event_markRead(hContact, hEvent);
+ // Only then delete the original event
+ db_event_delete(hContact, hEvent);
+ // Finally add new edited event, but with original event's properties (including flags)
return AddDbEvent(SKYPE_DB_EVENT_TYPE_EDITED_MESSAGE, hContact, dbei.timestamp, dbei.flags, jMsg.write().c_str(), szUid);
}