|
|
|
|
@ -2003,7 +2003,14 @@ pub fn sync_route(
@@ -2003,7 +2003,14 @@ pub fn sync_route(
|
|
|
|
|
|
|
|
|
|
let notification_count = |
|
|
|
|
if let Some(last_read) = db.rooms.edus.room_read_get(&room_id, &user_id).unwrap() { |
|
|
|
|
Some((db.rooms.pdus_since(&room_id, last_read).unwrap().count() as u32).into()) |
|
|
|
|
Some( |
|
|
|
|
(db.rooms |
|
|
|
|
.pdus_since(&room_id, last_read) |
|
|
|
|
.unwrap() |
|
|
|
|
.filter(|pdu| matches!(pdu.as_ref().unwrap().kind.clone(), EventType::RoomMessage | EventType::RoomEncrypted)) |
|
|
|
|
.count() as u32) |
|
|
|
|
.into(), |
|
|
|
|
) |
|
|
|
|
} else { |
|
|
|
|
None |
|
|
|
|
}; |
|
|
|
|
@ -2079,7 +2086,7 @@ pub fn sync_route(
@@ -2079,7 +2086,7 @@ pub fn sync_route(
|
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
unread_notifications: sync_events::UnreadNotificationsCount { |
|
|
|
|
highlight_count: notification_count, |
|
|
|
|
highlight_count: None, |
|
|
|
|
notification_count, |
|
|
|
|
}, |
|
|
|
|
timeline: sync_events::Timeline { |
|
|
|
|
|