mirror of
https://github.com/mjl-/mox.git
synced 2025-07-12 13:44:37 +03:00
implement storing non-system/well-known flags (keywords) for messages and mailboxes, with imap
the mailbox select/examine responses now return all flags used in a mailbox in the FLAGS response. and indicate in the PERMANENTFLAGS response that clients can set new keywords. we store these values on the new Message.Keywords field. system/well-known flags are still in Message.Flags, so we're recognizing those and handling them separately. the imap store command handles the new flags. as does the append command, and the search command. we store keywords in a mailbox when a message in that mailbox gets the keyword. we don't automatically remove the keywords from a mailbox. there is currently no way at all to remove a keyword from a mailbox. the import commands now handle non-system/well-known keywords too, when importing from mbox/maildir. jmap requires keyword support, so best to get it out of the way now.
This commit is contained in:
@ -26,7 +26,8 @@ type Change any
|
||||
type ChangeAddUID struct {
|
||||
MailboxID int64
|
||||
UID UID
|
||||
Flags Flags
|
||||
Flags Flags // System flags.
|
||||
Keywords []string // Other flags.
|
||||
}
|
||||
|
||||
// ChangeRemoveUIDs is sent for removal of one or more messages from a mailbox.
|
||||
@ -39,8 +40,9 @@ type ChangeRemoveUIDs struct {
|
||||
type ChangeFlags struct {
|
||||
MailboxID int64
|
||||
UID UID
|
||||
Mask Flags // Which flags are actually modified.
|
||||
Flags Flags // New flag values. All are set, not just mask.
|
||||
Mask Flags // Which flags are actually modified.
|
||||
Flags Flags // New flag values. All are set, not just mask.
|
||||
Keywords []string // Other flags.
|
||||
}
|
||||
|
||||
// ChangeRemoveMailbox is sent for a removed mailbox.
|
||||
|
Reference in New Issue
Block a user