diff options
author | Robert Pösel <robyer@seznam.cz> | 2017-03-15 09:20:22 +0100 |
---|---|---|
committer | Robert Pösel <robyer@seznam.cz> | 2017-03-15 09:20:22 +0100 |
commit | b225a055f5d3abc754899d115582f39cc2168f3f (patch) | |
tree | 61da7a01c6cfa7dbf2a2c6dd872b109b00b78d59 /protocols/SkypeWeb/src | |
parent | a36a65ba14f5d8e6c8fa24b837a04d53b9ec3fc8 (diff) |
SkypeWeb: Attempt to fix edited messages being stuck as unread (addresses #608)
Diffstat (limited to 'protocols/SkypeWeb/src')
-rw-r--r-- | protocols/SkypeWeb/src/skype_db.cpp | 6 |
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); } |