diff options
author | Eric Wong <e@80x24.org> | 2021-03-17 15:39:22 +0600 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2021-03-17 19:03:15 +0000 |
commit | 86f7b16ee50081d4eed779372ccc198d8a1770dc (patch) | |
tree | 6af5a9310cce2ceace5bcc431f0adb93b1b57945 /lib/PublicInbox/LeiImport.pm | |
parent | 4c6c853494b4936825741bb5e8885f1312639058 (diff) | |
download | public-inbox-86f7b16ee50081d4eed779372ccc198d8a1770dc.tar.gz |
lei_store: keywords => vmd (volatile metadata), prepare for labels
Since keywords and mailboxes (AKA labels) are separate things in JMAP; and only keywords can map reliably to Maildir and mbox; we'll keep them separate in our internal data representations, too. I initially wanted to call this just "meta" for "metadata", but that might be confused with our mailing list name. "metadata" is already used in Xapian's own API, to add another layer of confusion. "tags" was also considered, but probably confusing to notmuch users since our "labels" are analogous to "tags" in notmuch, and notmuch doesn't seem to cover "keywords" separately... So "vmd" it is, since we haven't used this particular three-letter-abbreviation anywhere before; and "volatile" seems like a good description of this metadata since everything else up to this point has been mostly WORM (write-once, read-many).
Diffstat (limited to 'lib/PublicInbox/LeiImport.pm')
-rw-r--r-- | lib/PublicInbox/LeiImport.pm | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/PublicInbox/LeiImport.pm b/lib/PublicInbox/LeiImport.pm index 65e37371..137c22fc 100644 --- a/lib/PublicInbox/LeiImport.pm +++ b/lib/PublicInbox/LeiImport.pm @@ -12,7 +12,7 @@ use PublicInbox::PktOp qw(pkt_do); sub _import_eml { # MboxReader callback my ($eml, $sto, $set_kw) = @_; $sto->ipc_do('set_eml', $eml, $set_kw ? - @{PublicInbox::MboxReader::mbox_keywords($eml)} : ()); + { kw => PublicInbox::MboxReader::mbox_keywords($eml) } : ()); } sub import_done_wait { # dwaitpid callback @@ -150,12 +150,12 @@ error reading $input: $! sub _import_maildir { # maildir_each_eml cb my ($f, $kw, $eml, $sto, $set_kw) = @_; - $sto->ipc_do('set_eml', $eml, $set_kw ? @$kw : ()); + $sto->ipc_do('set_eml', $eml, $set_kw ? { kw => $kw }: ()); } sub _import_net { # imap_each, nntp_each cb my ($url, $uid, $kw, $eml, $sto, $set_kw) = @_; - $sto->ipc_do('set_eml', $eml, $set_kw ? @$kw : ()); + $sto->ipc_do('set_eml', $eml, $set_kw ? { kw => $kw } : ()); } sub import_path_url { |