nostr-rs-relay

My dev fork of nostr-rs-relay
git clone git://jb55.com/nostr-rs-relay
Log | Files | Refs | README | LICENSE

commit 850064b871cb9d7f45cf5243119709bd76ee0765
parent b3c7852b1988c6cb1ad403d59723c2f138d104b8
Author: Greg Heartsfield <scsibug@imap.cc>
Date:   Sun, 12 Dec 2021 14:52:55 -0600

fix: handle filters with no criteria

Diffstat:
Msrc/db.rs | 3+++
1 file changed, 3 insertions(+), 0 deletions(-)

diff --git a/src/db.rs b/src/db.rs @@ -245,6 +245,9 @@ fn query_from_sub(sub: &Subscription) -> String { fc.push_str(&filter_components.join(" AND ")); fc.push_str(" )"); filter_clauses.push(fc); + } else { + // if there are no filter clauses, we should return everything + filter_clauses.push(" 1=1 ".to_owned()); } }