diff options
author | George Hazan <george.hazan@gmail.com> | 2023-12-22 17:55:36 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2023-12-22 17:55:36 +0300 |
commit | af546e2f55ccb9a270ce4967d1942aebfcbbea19 (patch) | |
tree | fc15b7c1616f190637989534918687cf17403274 /protocols/Facebook/src | |
parent | 7f2ed0ff4588043500b739e151c4db73e5e2968e (diff) |
DB::EventInfo::wipeNotify - useful helper to hide blinking event both from database & contact list
Diffstat (limited to 'protocols/Facebook/src')
-rw-r--r-- | protocols/Facebook/src/server.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/protocols/Facebook/src/server.cpp b/protocols/Facebook/src/server.cpp index fcf1aacb2e..8601cd6db5 100644 --- a/protocols/Facebook/src/server.cpp +++ b/protocols/Facebook/src/server.cpp @@ -958,16 +958,15 @@ void FacebookProto::OnPublishReadReceipt(const JSONNode &root) uint32_t timestamp = _wtoi64(root["watermarkTimestampMs"].as_mstring());
for (MEVENT ev = db_event_firstUnread(pUser->hContact); ev != 0; ev = db_event_next(pUser->hContact, ev)) {
- DBEVENTINFO dbei = {};
- if (db_event_get(ev, &dbei))
+ DB::EventInfo dbei(ev);
+ if (!dbei)
continue;
if (dbei.timestamp > timestamp)
break;
if (dbei.flags & DBEF_SENT)
- if (!dbei.markedRead())
- db_event_markRead(pUser->hContact, ev, true);
+ dbei.wipeNotify(ev);
}
}
|