improvement: better and more efficient message count calculation

This commit is contained in:
Timo Kösters 2021-04-12 12:40:16 +02:00
parent 1dc85895a7
commit 662a0cf1df
No known key found for this signature in database
GPG key ID: 24DA7517711A2BA4
7 changed files with 169 additions and 68 deletions

View file

@ -47,6 +47,8 @@ pub async fn set_read_marker_route(
))?,
&db.globals,
)?;
db.rooms
.reset_notification_counts(&sender_user, &body.room_id)?;
let mut user_receipts = BTreeMap::new();
user_receipts.insert(
@ -103,6 +105,8 @@ pub async fn create_receipt_route(
))?,
&db.globals,
)?;
db.rooms
.reset_notification_counts(&sender_user, &body.room_id)?;
let mut user_receipts = BTreeMap::new();
user_receipts.insert(