We may support idling on inbox-ish objects such as
PublicInbox::ExtSearch or similar (ActivityPub) objects in the
future, so taking version-specific knowledge out of InboxIdle
make sense for future changes.
sub thing_type { 'public inbox' }
+sub lock_file {
+ my ($self) = @_;
+ $self->{inboxdir}.($self->version >= 2 ? '/inbox.lock' : '/ssoma.lock')
+}
+
1;
my $dir = $ibx->{inboxdir};
my $inot = $self->{inot};
my $cur = $self->{pathmap}->{$dir} //= [];
- my $lock = "$dir/".($ibx->version >= 2 ? 'inbox.lock' : 'ssoma.lock');
+ my $lock = $ibx->lock_file;
# transfer old subscriptions to the current inbox, cancel the old watch
my $old_ibx = $cur->[0];