From e048d0962ba654f2ec02d80cf52c923553954ca7 Mon Sep 17 00:00:00 2001 From: Mechiel Lukkien Date: Sat, 16 Dec 2023 11:53:14 +0100 Subject: [PATCH] small fixes a typo, using ongoing tx instead of making a new one, don't pass literal string to formatting function. found while working on quota support. --- imapserver/server.go | 2 +- webadmin/admin.go | 2 +- webmail/api.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/imapserver/server.go b/imapserver/server.go index 0322687..33037e2 100644 --- a/imapserver/server.go +++ b/imapserver/server.go @@ -1150,7 +1150,7 @@ func xcheckmailboxname(name string, allowInbox bool) string { if isinbox { xuserErrorf("special mailboxname Inbox not allowed") } else if err != nil { - xusercodeErrorf("CANNOT", err.Error()) + xusercodeErrorf("CANNOT", "%s", err) } return name } diff --git a/webadmin/admin.go b/webadmin/admin.go index 103e5fe..c0c8bca 100644 --- a/webadmin/admin.go +++ b/webadmin/admin.go @@ -1209,7 +1209,7 @@ Ensure a DNS TXT record like the following exists: addf(&result.Instructions, instr) } - // Hots TLSRPT + // Host TLSRPT wg.Add(1) var hostTLSRPTAddr smtp.Address if mox.Conf.Static.HostTLSRPT.Localpart != "" { diff --git a/webmail/api.go b/webmail/api.go index f59ec19..203a3cd 100644 --- a/webmail/api.go +++ b/webmail/api.go @@ -628,7 +628,7 @@ func (w Webmail) MessageSubmit(ctx context.Context, m SubmitMessage) { } } - sentmb, err := bstore.QueryDB[store.Mailbox](ctx, acc.DB).FilterEqual("Sent", true).Get() + sentmb, err := bstore.QueryTx[store.Mailbox](tx).FilterEqual("Sent", true).Get() if err == bstore.ErrAbsent { // There is no mailbox designated as Sent mailbox, so we're done. return