aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plugins/base/handlers.go6
-rw-r--r--session.go6
2 files changed, 6 insertions, 6 deletions
diff --git a/plugins/base/handlers.go b/plugins/base/handlers.go
index 3160026..c96dabf 100644
--- a/plugins/base/handlers.go
+++ b/plugins/base/handlers.go
@@ -43,7 +43,7 @@ func handleGetMailbox(ectx echo.Context) error {
var mailboxes []*imap.MailboxInfo
var msgs []imapMessage
var mbox *imap.MailboxStatus
- err = ctx.Session.Do(func(c *imapclient.Client) error {
+ err = ctx.Session.DoIMAP(func(c *imapclient.Client) error {
var err error
if mailboxes, err = listMailboxes(c); err != nil {
return err
@@ -128,7 +128,7 @@ func handleGetPart(ctx *koushin.Context, raw bool) error {
var msg *imapMessage
var part *message.Entity
var mbox *imap.MailboxStatus
- err = ctx.Session.Do(func(c *imapclient.Client) error {
+ err = ctx.Session.DoIMAP(func(c *imapclient.Client) error {
var err error
msg, part, err = getMessagePart(c, mboxName, uid, partPath)
mbox = c.Mailbox()
@@ -208,7 +208,7 @@ func handleCompose(ectx echo.Context) error {
var inReplyTo *imapMessage
var part *message.Entity
- err = ctx.Session.Do(func(c *imapclient.Client) error {
+ err = ctx.Session.DoIMAP(func(c *imapclient.Client) error {
var err error
inReplyTo, part, err = getMessagePart(c, mboxName, uid, partPath)
return err
diff --git a/session.go b/session.go
index 8f3f748..d75be10 100644
--- a/session.go
+++ b/session.go
@@ -58,9 +58,9 @@ func (s *Session) Username() string {
return s.username
}
-// Do executes an IMAP operation on this session. The IMAP client can only be
-// used from inside f.
-func (s *Session) Do(f func(*imapclient.Client) error) error {
+// DoIMAP executes an IMAP operation on this session. The IMAP client can only
+// be used from inside f.
+func (s *Session) DoIMAP(f func(*imapclient.Client) error) error {
s.locker.Lock()
defer s.locker.Unlock()