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

Commit

Permalink
Merge branch 'master' into go-message
Browse files Browse the repository at this point in the history
  • Loading branch information
emersion committed Jul 4, 2017
2 parents 40b97f8 + 9461062 commit 6bd6447
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 @@ -161,7 +161,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 @@ -398,7 +398,7 @@ func (be *Messages) UpdateMessage(user string, update *backend.MessageUpdate) (m
return
}

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

msg, err = be.GetMessage(user, update.Message.ID)
Expand Down Expand Up @@ -545,7 +545,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 6bd6447

Please sign in to comment.