diff options
author | Reto Brunner <reto@labrat.space> | 2019-09-13 08:48:00 +0200 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2019-09-16 12:19:14 -0400 |
commit | 3f452ca283e7e1b0e0f75f386f7551c0766d8704 (patch) | |
tree | d4fc8839067358856441c919b864d73bc2914fee | |
parent | 83207c1e1d00d118a2bba20d9fd178f32d7f88da (diff) |
notmuch: sync maildir flags
Syncs back special notmuch tag like unread to the underlying maildir store
-rw-r--r-- | go.mod | 2 | ||||
-rw-r--r-- | go.sum | 2 | ||||
-rw-r--r-- | worker/notmuch/lib/database.go | 5 |
3 files changed, 7 insertions, 2 deletions
@@ -29,7 +29,7 @@ require ( github.com/smartystreets/assertions v1.0.1 // indirect github.com/smartystreets/goconvey v0.0.0-20190710185942-9d28bd7c0945 // indirect github.com/stretchr/testify v1.3.0 - github.com/zenhack/go.notmuch v0.0.0-20190726231123-3d59f87d986e + github.com/zenhack/go.notmuch v0.0.0-20190821052706-5a1961965cfb golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7 // indirect golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45 golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a // indirect @@ -85,6 +85,8 @@ github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0 github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/zenhack/go.notmuch v0.0.0-20190726231123-3d59f87d986e h1:IeB1sn/RMq/o0PP7HNMNpTUHvvOZln9smuJXz1S7qJY= github.com/zenhack/go.notmuch v0.0.0-20190726231123-3d59f87d986e/go.mod h1:zJtFvR3NinVdmBiLyB4MyXKmqyVfZEb2cK97ISfTgV8= +github.com/zenhack/go.notmuch v0.0.0-20190821052706-5a1961965cfb h1:eZBIw4TilXSAEYcWKf51bERhwH431YwntDYus0Bgxh0= +github.com/zenhack/go.notmuch v0.0.0-20190821052706-5a1961965cfb/go.mod h1:zJtFvR3NinVdmBiLyB4MyXKmqyVfZEb2cK97ISfTgV8= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/image v0.0.0-20190523035834-f03afa92d3ff/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= diff --git a/worker/notmuch/lib/database.go b/worker/notmuch/lib/database.go index 3398504..f4fd588 100644 --- a/worker/notmuch/lib/database.go +++ b/worker/notmuch/lib/database.go @@ -159,6 +159,10 @@ func (db *DB) msgModify(key string, defer msg.Close() cb(msg) + err = msg.TagsToMaildirFlags() + if err != nil { + db.logger.Printf("could not sync maildir flags: %v", err) + } return nil } @@ -176,4 +180,3 @@ func (db *DB) MsgModifyTags(key string, add, remove []string) error { }) return err } - |