Gigantic feeds probably make some clients unhappy,
clamp it to what it was in the past.
Fixes: b9534449ecce2c59 ("view: avoid offset during pagination")
die "BUG: unsupported inbox version: $v\n";
}
if (my $srch = $ibx->search) {
- return PublicInbox::View::paginate_recent($ctx);
+ return PublicInbox::View::paginate_recent($ctx, $max);
}
my $hex = '[a-f0-9]';
pagination_footer($ctx, '.')
}
-sub paginate_recent ($) {
- my ($ctx) = @_;
+sub paginate_recent ($$) {
+ my ($ctx, $lim) = @_;
my $t = $ctx->{qp}->{t} || '';
- my $lim = 200; # this is our window
my $opts = { limit => $lim };
my ($after, $before);
sub index_topics {
my ($ctx) = @_;
- my $msgs = paginate_recent($ctx);
+ my $msgs = paginate_recent($ctx, 200); # 200 is our window
if (@$msgs) {
walk_thread(thread_results($ctx, $msgs), $ctx, *acc_topic);
}