From 713aa404c74e0463570b8db4d6a1030f82e1c609 Mon Sep 17 00:00:00 2001 From: sakrecoer Date: Tue, 26 May 2026 21:06:35 +0200 Subject: [PATCH] invert the filtering for our purposes --- src/filters/kinds.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/filters/kinds.rs b/src/filters/kinds.rs index d1a1db1..6cb1caf 100644 --- a/src/filters/kinds.rs +++ b/src/filters/kinds.rs @@ -11,12 +11,12 @@ pub struct Kinds { impl NoteFilter for Kinds { fn filter_note(&mut self, input: &InputMessage) -> OutputMessage { let kind = input.event.kind; - if self.kinds.contains(&kind) { + if !self.kinds.contains(&kind) { let msg = self .messages .as_ref() .and_then(|msgs| msgs.get(&kind.to_string()).cloned()) - .unwrap_or_else(|| "blocked: note kind is not allowed here".to_string()); + .unwrap_or_else(|| "blocked: this relay only accept music and playlist events (kind 36787 and 34139)".to_string()); OutputMessage::new(input.event.id.clone(), Action::Reject, Some(msg)) } else { OutputMessage::new(input.event.id.clone(), Action::Accept, None)