summaryrefslogtreecommitdiff
path: root/lib/MaildirIndexer/Store.pm6
diff options
context:
space:
mode:
authordakkar <dakkar@thenautilus.net>2018-11-09 16:18:11 +0000
committerdakkar <dakkar@thenautilus.net>2018-11-09 16:18:11 +0000
commit7b5c1abf0bac5147efa468f50a384310b4376a7e (patch)
treeb7a2223f9a389250cec88488125813a6a58717ec /lib/MaildirIndexer/Store.pm6
parentfix indent (diff)
downloadMaildirIndexer-7b5c1abf0bac5147efa468f50a384310b4376a7e.tar.gz
MaildirIndexer-7b5c1abf0bac5147efa468f50a384310b4376a7e.tar.bz2
MaildirIndexer-7b5c1abf0bac5147efa468f50a384310b4376a7e.zip
feature parity!
Diffstat (limited to 'lib/MaildirIndexer/Store.pm6')
-rw-r--r--lib/MaildirIndexer/Store.pm66
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/MaildirIndexer/Store.pm6 b/lib/MaildirIndexer/Store.pm6
index 5bacbe9..7447643 100644
--- a/lib/MaildirIndexer/Store.pm6
+++ b/lib/MaildirIndexer/Store.pm6
@@ -37,6 +37,12 @@ method del-file(IO $file) {
return;
}
+method mailbox-for-email(MaildirIndexer::Email $email) {
+ my $id = $email.message-id or return Nil;
+ with %!mailboxes-for-id{$id} { return .[*-1] }
+ return Nil;
+}
+
sub mailbox-from-path(Str() $path) {
$path ~~ m{'/' (<-[/]>+?) '/' [cur|new|tmp] '/'} and return ~$/[0];
return Nil;