From ca263b50d2a0d38c33c31fd6161bd966361051b8 Mon Sep 17 00:00:00 2001 From: xeruf <27jf@pm.me> Date: Mon, 25 Nov 2024 10:44:25 +0100 Subject: [PATCH] fix(tasks): filter by owner instead of creator --- src/tasks.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/tasks.rs b/src/tasks.rs index c559015..7b7db73 100644 --- a/src/tasks.rs +++ b/src/tasks.rs @@ -509,7 +509,7 @@ impl TasksRelay { fn filter(&self, task: &Task) -> bool { self.state.matches(task) && - (!task.is_task() || self.pubkey.is_none_or(|p| p == task.event.pubkey)) && + (!task.is_task() || self.pubkey.is_none_or(|p| p == task.get_owner())) && self.priority.is_none_or(|prio| { task.priority().unwrap_or(DEFAULT_PRIO) >= prio }) && @@ -712,6 +712,7 @@ impl TasksRelay { pub(crate) fn reset_key_filter(&mut self) { let own = self.sender.pubkey(); if self.pubkey.is_some_and(|k| k == own) { + self.view.clear(); info!("Showing everybody's tasks"); self.pubkey = None } else {