-
Notifications
You must be signed in to change notification settings - Fork 43
Conversation
backend/imap/attachments.go
Outdated
@@ -53,7 +53,12 @@ func (b *Messages) ReadAttachment(user, id string) (att *backend.Attachment, out | |||
return | |||
} | |||
|
|||
att, r := parseAttachment(data.GetBody("BODY["+partId+"]")) | |||
var bodySectionName *imap.BodySectionName |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use tabs for indentation! (you can go fmt
your source code to fix it btw)
backend/imap/attachments.go
Outdated
@@ -53,7 +53,12 @@ func (b *Messages) ReadAttachment(user, id string) (att *backend.Attachment, out | |||
return | |||
} | |||
|
|||
att, r := parseAttachment(data.GetBody("BODY["+partId+"]")) | |||
var bodySectionName *imap.BodySectionName | |||
bodySectionName, err = imap.ParseBodySectionName(imap.FetchItem("BODY"+partId+"]")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing a [
here
backend/imap/conn.go
Outdated
@@ -151,7 +151,7 @@ func (b *conns) idle(clt *client) error { | |||
c := clt.conn | |||
|
|||
mailbox := "INBOX" | |||
if c.Mailbox != nil && c.Mailbox.Name != mailbox { | |||
if c.Mailbox != nil && c.Mailbox().Name != mailbox { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
c.Mailbox
is never nil
because it's a function. You want to check if c.Mailbox()
is nil
instead.
backend/imap/conn.go
Outdated
@@ -283,7 +291,7 @@ func (b *conns) selectMailbox(user, mailbox string) (err error) { | |||
} | |||
defer unlock() | |||
|
|||
if c.Mailbox == nil || c.Mailbox.Name != mailbox { | |||
if c.Mailbox == nil || c.Mailbox().Name != mailbox { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here, c.Mailbox() == nil
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work!
The mailbox update changes seem fine, but all of that needs testing.
Okay, I added some commits to address these issues and pushed them up. Do I need to do anything on github, like make a new pull request, or move some sort of pointer on this PR? Or does the pull request track the branch and I'm all set? |
Thanks! |
These changes make it so that neutron compiles, at least, fixing #49
I'm not entirely sure I dealt with MailboxUpdate correctly, though. I haven't been able to test yet, due to possibly-unrelated reasons. But I wanted to make these changes at least available to review while I fixed my other problems.