Skip to content
This repository has been archived by the owner on Feb 13, 2022. It is now read-only.

Commit

Permalink
Fixes build with latest go-imap updates, fixes #39
Browse files Browse the repository at this point in the history
  • Loading branch information
emersion committed Jul 4, 2017
1 parent 4aab8d9 commit 9461062
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion backend/imap/attachments.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func (b *Messages) ReadAttachment(user, id string) (att *backend.Attachment, out
}
defer unlock()

seqset, _ := imap.NewSeqSet("")
seqset := new(imap.SeqSet)
seqset.AddNum(uid)

items := []string{"BODY.PEEK["+partId+"]"}
Expand Down
2 changes: 1 addition & 1 deletion backend/imap/events.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func (b *Events) processUpdate(u *update) error {
}

mailbox := c.Mailbox.Name
seqset, _ := imap.NewSeqSet("")
seqset := new(imap.SeqSet)
seqset.AddNum(u.seqnbr)

ch := make(chan *imap.Message, 1)
Expand Down
8 changes: 4 additions & 4 deletions backend/imap/messages.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ func (be *Messages) GetMessage(user, id string) (msg *backend.Message, err error
}
defer unlock()

seqset, _ := imap.NewSeqSet("")
seqset := new(imap.SeqSet)
seqset.AddNum(uid)
items := []string{imap.FlagsMsgAttr, imap.SizeMsgAttr, imap.BodyStructureMsgAttr, "RFC822.HEADER"}

Expand Down Expand Up @@ -156,7 +156,7 @@ func (b *Messages) ListMessages(user string, filter *backend.MessagesFilter) (ms
return
}

set, _ := imap.NewSeqSet("")
set := new(imap.SeqSet)
if filter.Limit > 0 && filter.Page >= 0 {
from := filter.Limit * filter.Page
to := filter.Limit * (filter.Page + 1)
Expand Down Expand Up @@ -386,7 +386,7 @@ func (b *Messages) UpdateMessage(user string, update *backend.MessageUpdate) (ms
return
}

seqset, _ := imap.NewSeqSet("")
seqset := new(imap.SeqSet)
seqset.AddNum(uid)

msg, err = b.GetMessage(user, update.Message.ID)
Expand Down Expand Up @@ -529,7 +529,7 @@ func (b *Messages) DeleteMessage(user, id string) (err error) {
return
}

seqset, _ := imap.NewSeqSet("")
seqset := new(imap.SeqSet)
seqset.AddNum(uid)

err = b.deleteMessages(user, seqset)
Expand Down

0 comments on commit 9461062

Please sign in to comment.