diff options
author | Eric Wong <e@80x24.org> | 2023-04-06 12:39:52 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2023-04-06 21:20:50 +0000 |
commit | 51a786f7215a2b84114c76fbd6589a55c198af65 (patch) | |
tree | d46f60b2793c2de69fc7dc583f10a3e079562aeb /lib/PublicInbox/Watch.pm | |
parent | c32cb39ce267f684c1171bf42e879f797c40e79f (diff) | |
download | public-inbox-51a786f7215a2b84114c76fbd6589a55c198af65.tar.gz |
I favor leaving the publicinbox.<name>.indexlevel parameter out of config files to make it easier to alter and reduce sources of truth. It worked well in most cases, but public-inbox-watch also needs to detect the indexlevel. Moving the sub to InboxWritable (from Admin) probably makes sense since it's a per-inbox attribute and allows -watch to reuse it.
Diffstat (limited to 'lib/PublicInbox/Watch.pm')
-rw-r--r-- | lib/PublicInbox/Watch.pm | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/PublicInbox/Watch.pm b/lib/PublicInbox/Watch.pm index 693c7181..b87abafe 100644 --- a/lib/PublicInbox/Watch.pm +++ b/lib/PublicInbox/Watch.pm @@ -79,6 +79,8 @@ sub new { my $ibx = $_[0] = PublicInbox::InboxWritable->new($_[0]); my $watches = $ibx->{watch} or return; + + $ibx->{indexlevel} //= $ibx->detect_indexlevel; $watches = PublicInbox::Config::_array($watches); for my $watch (@$watches) { my $uri; |