From b225a055f5d3abc754899d115582f39cc2168f3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20P=C3=B6sel?= Date: Wed, 15 Mar 2017 09:20:22 +0100 Subject: SkypeWeb: Attempt to fix edited messages being stuck as unread (addresses #608) --- protocols/SkypeWeb/src/skype_db.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'protocols/SkypeWeb') 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); } -- cgit v1.2.3