diff options
author | Reto Brunner <reto@labrat.space> | 2020-09-12 15:05:02 +0200 |
---|---|---|
committer | Reto Brunner <reto@labrat.space> | 2020-10-11 09:18:45 +0200 |
commit | b6bcf89784605aa8baa982677de9d8d8ddbaa404 (patch) | |
tree | 532a17d2c5fbf67b1576ca718596e271b631b384 /worker/imap/worker.go | |
parent | d8a75a5159eb9bf18e629be0598aaef5f90da7e4 (diff) | |
download | aerc-b6bcf89784605aa8baa982677de9d8d8ddbaa404.tar.gz |
imap: add sort support
Diffstat (limited to 'worker/imap/worker.go')
-rw-r--r-- | worker/imap/worker.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/worker/imap/worker.go b/worker/imap/worker.go index c016af66..dab0afb5 100644 --- a/worker/imap/worker.go +++ b/worker/imap/worker.go @@ -8,6 +8,7 @@ import ( "github.com/emersion/go-imap" idle "github.com/emersion/go-imap-idle" + sortthread "github.com/emersion/go-imap-sortthread" "github.com/emersion/go-imap/client" "golang.org/x/oauth2" @@ -27,6 +28,7 @@ var errUnsupported = fmt.Errorf("unsupported command") type imapClient struct { *client.Client idle *idle.IdleClient + sort *sortthread.SortClient } type IMAPWorker struct { @@ -155,7 +157,7 @@ func (w *IMAPWorker) handleMessage(msg types.WorkerMessage) error { } c.Updates = w.updates - w.client = &imapClient{c, idle.NewClient(c)} + w.client = &imapClient{c, idle.NewClient(c), sortthread.NewSortClient(c)} w.worker.PostMessage(&types.Done{types.RespondTo(msg)}, nil) case *types.ListDirectories: w.handleListDirectories(msg) |