Fix notes unread status (#7643)
1. The client-side comparison was wrong 2. The server never told the client about the version it remembered 3. The server generated broken timestamps in some cases Release Notes: - Fixed the notes/chat appearing as unread too often **or** - N/A
This commit is contained in:
parent
e2a3e89318
commit
68893c2ae6
9 changed files with 157 additions and 120 deletions
|
@ -337,17 +337,12 @@ async fn test_channel_buffers_last_operations(db: &Database) {
|
|||
let buffer_changes = db
|
||||
.transaction(|tx| {
|
||||
let buffers = &buffers;
|
||||
async move {
|
||||
db.latest_channel_buffer_changes(
|
||||
&[
|
||||
buffers[0].channel_id,
|
||||
buffers[1].channel_id,
|
||||
buffers[2].channel_id,
|
||||
],
|
||||
&*tx,
|
||||
)
|
||||
.await
|
||||
}
|
||||
let mut hash = HashMap::default();
|
||||
hash.insert(buffers[0].id, buffers[0].channel_id);
|
||||
hash.insert(buffers[1].id, buffers[1].channel_id);
|
||||
hash.insert(buffers[2].id, buffers[2].channel_id);
|
||||
|
||||
async move { db.latest_channel_buffer_changes(&hash, &*tx).await }
|
||||
})
|
||||
.await
|
||||
.unwrap();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue