From dd9816f86ca389ec357014fdd21b9042b3094743 Mon Sep 17 00:00:00 2001 From: Mike Dilger Date: Sun, 23 Jun 2024 09:41:16 +1200 Subject: [PATCH] Don't error and complain about DM kinds in a request that has no kinds specified (just silently don't return them) --- src/nostr.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/nostr.rs b/src/nostr.rs index d44548e..005057b 100644 --- a/src/nostr.rs +++ b/src/nostr.rs @@ -113,9 +113,9 @@ impl WebSocketService { if user.is_none() { for filter in filters.iter() { - // If any DM kinds were requested - if filter.num_kinds() == 0 - || filter + // If any DM kinds were requested, complain. + // But if NO kinds were requested, we will just silently not return DMs (elsewhere) + if filter .kinds() .any(|k| k.as_u16() == 4 || k.as_u16() == 1059) {