mirror of
https://github.com/mjl-/mox.git
synced 2025-07-12 19:44:34 +03:00
implement IMAP CREATE-SPECIAL-USE extension for the mailbox create command, part of rfc 6154
we already supported special-use flags. settable through the webmail interface, and new accounts already got standard mailboxes with special-use flags predefined. but now the IMAP "CREATE" command implements creating mailboxes with special-use flags.
This commit is contained in:
@ -168,18 +168,18 @@ func TestMailbox(t *testing.T) {
|
||||
|
||||
acc.WithWLock(func() {
|
||||
err := acc.DB.Write(ctxbg, func(tx *bstore.Tx) error {
|
||||
_, _, err := acc.MailboxEnsure(tx, "Testbox", true)
|
||||
_, _, err := acc.MailboxEnsure(tx, "Testbox", true, SpecialUse{})
|
||||
return err
|
||||
})
|
||||
tcheck(t, err, "ensure mailbox exists")
|
||||
err = acc.DB.Read(ctxbg, func(tx *bstore.Tx) error {
|
||||
_, _, err := acc.MailboxEnsure(tx, "Testbox", true)
|
||||
_, _, err := acc.MailboxEnsure(tx, "Testbox", true, SpecialUse{})
|
||||
return err
|
||||
})
|
||||
tcheck(t, err, "ensure mailbox exists")
|
||||
|
||||
err = acc.DB.Write(ctxbg, func(tx *bstore.Tx) error {
|
||||
_, _, err := acc.MailboxEnsure(tx, "Testbox2", false)
|
||||
_, _, err := acc.MailboxEnsure(tx, "Testbox2", false, SpecialUse{})
|
||||
tcheck(t, err, "create mailbox")
|
||||
|
||||
exists, err := acc.MailboxExists(tx, "Testbox2")
|
||||
|
Reference in New Issue
Block a user