about summary refs log tree commit homepage
path: root/lib/PublicInbox/LeiImport.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2021-02-06 12:18:29 +0000
committerEric Wong <e@80x24.org>2021-02-07 03:34:32 +0000
commit618c5d7767a3611d70f78825156d5ddac7ce9427 (patch)
tree8dd9b615a7e7b4ab2a4f2eab2c767a27ece18902 /lib/PublicInbox/LeiImport.pm
parent375ea9f09355d36f2a9550475012a8191cdff1b0 (diff)
downloadpublic-inbox-618c5d7767a3611d70f78825156d5ddac7ce9427.tar.gz
JMAP brain says "keywords", IMAP brain says "flags";
JMAP brain wins today.

Since "keywords" is a bit long, support "kw" as a shortcut since
there's no conflict and "kw:" will be our search prefix for
looking up messages by keyword.
Diffstat (limited to 'lib/PublicInbox/LeiImport.pm')
-rw-r--r--lib/PublicInbox/LeiImport.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/PublicInbox/LeiImport.pm b/lib/PublicInbox/LeiImport.pm
index 4a9af8a7..2c7cbf2b 100644
--- a/lib/PublicInbox/LeiImport.pm
+++ b/lib/PublicInbox/LeiImport.pm
@@ -26,7 +26,7 @@ sub call { # the main "lei import" method
         my ($cls, $lei, @argv) = @_;
         my $sto = $lei->_lei_store(1);
         $sto->write_prepare($lei);
-        $lei->{opt}->{flags} //= 1;
+        $lei->{opt}->{kw} //= 1;
         my $fmt = $lei->{opt}->{'format'};
         my $self = $lei->{imp} = bless {}, $cls;
         return $lei->fail('--format unspecified') if !$fmt;
@@ -63,7 +63,7 @@ sub ipc_atfork_child {
 
 sub _import_fh {
         my ($lei, $fh, $x) = @_;
-        my $set_kw = $lei->{opt}->{flags};
+        my $set_kw = $lei->{opt}->{kw};
         my $fmt = $lei->{opt}->{'format'};
         eval {
                 if ($fmt eq 'eml') {