From 16551feea31fc366c85d6bdf76ccfc9539304828 Mon Sep 17 00:00:00 2001 From: Benjamin Bouvier Date: Thu, 11 Apr 2024 11:10:54 +0200 Subject: [PATCH] timeline: lower log severity of read receipts issues Those two issues really aren't errors we should be too scared of: - on the one hand, they don't prevent correct usage of the timeline, but slightly decrease the UX's quality - on the other hand, they may indicate that read receipts haven't been received yet, OR some events are unknown (can be happening if the previous read receipt refers to an event the timeline doesn't know about). So I lowered their severity to debug instead of error, since only outstanding issues should errors or warnings in my opinion. --- crates/matrix-sdk-ui/src/timeline/read_receipts.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/matrix-sdk-ui/src/timeline/read_receipts.rs b/crates/matrix-sdk-ui/src/timeline/read_receipts.rs index 0b105d708..05f95bf58 100644 --- a/crates/matrix-sdk-ui/src/timeline/read_receipts.rs +++ b/crates/matrix-sdk-ui/src/timeline/read_receipts.rs @@ -24,7 +24,7 @@ use ruma::{ events::receipt::{Receipt, ReceiptEventContent, ReceiptThread, ReceiptType}, EventId, OwnedEventId, OwnedUserId, UserId, }; -use tracing::{error, warn}; +use tracing::{debug, error, warn}; use super::{ inner::{ @@ -282,7 +282,7 @@ impl ReadReceiptTimelineUpdate { }; let Some((receipt_pos, event_item)) = rfind_event_by_id(items, event_id) else { - error!(%event_id, %user_id, "inconsistent state: old event item for read receipt was not found"); + debug!(%event_id, %user_id, "inconsistent state: old event item for read receipt was not found"); return; }; @@ -291,7 +291,7 @@ impl ReadReceiptTimelineUpdate { if let Some(remote_event_item) = event_item.as_remote_mut() { if remote_event_item.read_receipts.swap_remove(user_id).is_none() { - error!( + debug!( %event_id, %user_id, "inconsistent state: old event item for user's read \ receipt doesn't have a receipt for the user"