commit 2d9f45603cb14263b3c701ba1df692badd6a63e5 parent ab08e678a9c2d1f9d51a3217854283c1e04bb907 Author: William Casarin <jb55@jb55.com> Date: Thu, 30 May 2024 15:10:40 +0200 remote: use default_remote_limit instead of hardcoding Signed-off-by: William Casarin <jb55@jb55.com> Diffstat:
M | src/app.rs | | | 7 | ++++--- |
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/src/app.rs b/src/app.rs @@ -107,9 +107,10 @@ fn send_initial_filters(damus: &mut Damus, relay_url: &str) { since_optimize_filter(f, timeline.notes(ViewFilter::NotesAndReplies)); // limit the size of remote filters - let lim = f.limit.unwrap_or(100); - if lim > 150 { - f.limit = Some(150); + let default_limit = enostr::Filter::default_remote_limit(); + let lim = f.limit.unwrap_or(default_limit); + if lim > default_limit { + f.limit = Some(default_limit); } } relay.subscribe(format!("initial{}", c), filter);