aboutsummaryrefslogtreecommitdiff
path: root/worker/lib
diff options
context:
space:
mode:
Diffstat (limited to 'worker/lib')
-rw-r--r--worker/lib/parse.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/worker/lib/parse.go b/worker/lib/parse.go
index c3a43ca..eed39cb 100644
--- a/worker/lib/parse.go
+++ b/worker/lib/parse.go
@@ -207,6 +207,7 @@ func parseAddressList(h *mail.Header, key string) ([]*models.Address, error) {
type RawMessage interface {
NewReader() (io.Reader, error)
ModelFlags() ([]models.Flag, error)
+ Labels() ([]string, error)
UID() uint32
}
@@ -233,10 +234,15 @@ func MessageInfo(raw RawMessage) (*models.MessageInfo, error) {
if err != nil {
return nil, err
}
+ labels, err := raw.Labels()
+ if err != nil {
+ return nil, err
+ }
return &models.MessageInfo{
BodyStructure: bs,
Envelope: env,
Flags: flags,
+ Labels: labels,
InternalDate: env.Date,
RFC822Headers: &mail.Header{msg.Header},
Size: 0,