Skip to content

Commit

Permalink
Allow NWC filters that only have an author or pubkey
Browse files Browse the repository at this point in the history
  • Loading branch information
benthecarman committed Dec 12, 2023
1 parent fffef50 commit 96c4d6a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -359,8 +359,8 @@ pub async fn main(req: Request, env: Env, _ctx: Context) -> Result<Response> {
|| kinds.unwrap_or(&vec![])
.contains(&Kind::WalletConnectRequest)
) &&
// has authors and pubkeys
!filter.authors.as_ref().unwrap_or(&vec![]).is_empty() &&
// has authors or pubkeys
!filter.authors.as_ref().unwrap_or(&vec![]).is_empty() ||
!filter.pubkeys.as_ref().unwrap_or(&vec![]).is_empty()
};

Expand Down

0 comments on commit 96c4d6a

Please sign in to comment.