fix(NIP-01): allow limits on a per-filter basis
The original implementation of subscription limit applied to the entire query, instead of the specific filter. Now, each filter gets its own query limit. When a limit is applied, the most recent N events will be returned, otherwise the default is to return the earliest events (in order), for all matching events.
This commit is contained in:
+1
-1
@@ -32,7 +32,7 @@ pub struct ReqFilter {
|
||||
/// List of author public keys
|
||||
pub authors: Option<Vec<String>>,
|
||||
/// Limit number of results
|
||||
pub limit: Option<u32>,
|
||||
pub limit: Option<u64>,
|
||||
/// Set of tags
|
||||
#[serde(skip)]
|
||||
pub tags: Option<HashMap<String, HashSet<String>>>,
|
||||
|
||||
Reference in New Issue
Block a user