From d28fb5341e8539c0e3a13b1be75f7018054e9bbb Mon Sep 17 00:00:00 2001 From: Kevin Kuehler Date: Mon, 28 Oct 2019 12:07:08 -0700 Subject: Add SupportThread to notmuch and maildir * notmuch: add placeholder since it has native thread support * maildir: Return false since it does not have native thread support Signed-off-by: Kevin Kuehler --- worker/maildir/worker.go | 11 +++++++++++ worker/notmuch/worker.go | 12 ++++++++++++ 2 files changed, 23 insertions(+) (limited to 'worker') diff --git a/worker/maildir/worker.go b/worker/maildir/worker.go index 1df4e09..3ce396a 100644 --- a/worker/maildir/worker.go +++ b/worker/maildir/worker.go @@ -170,6 +170,8 @@ func (w *Worker) handleMessage(msg types.WorkerMessage) error { return w.handleOpenDirectory(msg) case *types.FetchDirectoryContents: return w.handleFetchDirectoryContents(msg) + case *types.FetchNativeThreadSupport: + return w.handleFetchNativeThreadSupport(msg) case *types.CreateDirectory: return w.handleCreateDirectory(msg) case *types.FetchMessageHeaders: @@ -291,6 +293,15 @@ func (w *Worker) handleFetchDirectoryContents( return nil } +func (w *Worker) handleFetchNativeThreadSupport( + msg *types.FetchNativeThreadSupport) error { + w.worker.PostMessage(&types.NativeThreadSupport{ + Message: types.RespondTo(msg), + HasSupport: false, + }, nil) + return nil +} + func (w *Worker) sort(uids []uint32, criteria []*types.SortCriterion) ([]uint32, error) { if len(criteria) == 0 { return uids, nil diff --git a/worker/notmuch/worker.go b/worker/notmuch/worker.go index 96adc29..c0233f5 100644 --- a/worker/notmuch/worker.go +++ b/worker/notmuch/worker.go @@ -80,6 +80,8 @@ func (w *worker) handleMessage(msg types.WorkerMessage) error { return w.handleListDirectories(msg) case *types.OpenDirectory: return w.handleOpenDirectory(msg) + case *types.FetchNativeThreadSupport: + return w.handleFetchNativeThreadSupport(msg) case *types.FetchDirectoryContents: return w.handleFetchDirectoryContents(msg) case *types.FetchMessageHeaders: @@ -194,6 +196,16 @@ func (w *worker) handleFetchDirectoryContents( return nil } +func (w *worker) handleFetchNativeThreadSupport( + msg *types.FetchNativeThreadSupport) error { + // FIXME + w.w.PostMessage(&types.NativeThreadSupport{ + Message: types.RespondTo(msg), + HasSupport: false, + }, nil) + return nil +} + func (w *worker) handleFetchMessageHeaders( msg *types.FetchMessageHeaders) error { for _, uid := range msg.Uids { -- cgit v1.2.3