From 697bd4eb83415913ee842b957b1778141fda39cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20D=E2=80=99Aquino?= Date: Fri, 2 Aug 2024 16:34:21 -0700 Subject: [PATCH] Add more debug logging for better troubleshooting MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Daniel D’Aquino --- src/notification_manager/mute_manager.rs | 5 +++++ src/notification_manager/notification_manager.rs | 1 + 2 files changed, 6 insertions(+) diff --git a/src/notification_manager/mute_manager.rs b/src/notification_manager/mute_manager.rs index 97f5940..6aba464 100644 --- a/src/notification_manager/mute_manager.rs +++ b/src/notification_manager/mute_manager.rs @@ -18,6 +18,11 @@ impl MuteManager { event: &Event, pubkey: &PublicKey, ) -> bool { + log::debug!( + "Checking if event {:?} should be muted for pubkey {:?}", + event, + pubkey + ); if let Some(mute_list) = self.get_public_mute_list(pubkey).await { for tag in mute_list.tags() { match tag.kind() { diff --git a/src/notification_manager/notification_manager.rs b/src/notification_manager/notification_manager.rs index 45bb2bc..66ff446 100644 --- a/src/notification_manager/notification_manager.rs +++ b/src/notification_manager/notification_manager.rs @@ -132,6 +132,7 @@ impl NotificationManager { ); let one_week_ago = nostr::Timestamp::now() - 7 * 24 * 60 * 60; if event.created_at < one_week_ago { + log::debug!("Event is older than a week, not sending notifications"); return Ok(()); }