aboutsummaryrefslogtreecommitdiffstats
path: root/worker/maildir/worker.go
diff options
context:
space:
mode:
Diffstat (limited to 'worker/maildir/worker.go')
-rw-r--r--worker/maildir/worker.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/worker/maildir/worker.go b/worker/maildir/worker.go
index 1e68a2e6..84e0162d 100644
--- a/worker/maildir/worker.go
+++ b/worker/maildir/worker.go
@@ -11,9 +11,14 @@ import (
"github.com/fsnotify/fsnotify"
"git.sr.ht/~sircmpwn/aerc/models"
+ "git.sr.ht/~sircmpwn/aerc/worker/handlers"
"git.sr.ht/~sircmpwn/aerc/worker/types"
)
+func init() {
+ handlers.RegisterWorkerFactory("maildir", NewWorker)
+}
+
var errUnsupported = fmt.Errorf("unsupported command")
// A Worker handles interfacing between aerc's UI and a group of maildirs.
@@ -25,7 +30,7 @@ type Worker struct {
}
// NewWorker creates a new maildir worker with the provided worker.
-func NewWorker(worker *types.Worker) (*Worker, error) {
+func NewWorker(worker *types.Worker) (types.Backend, error) {
watch, err := fsnotify.NewWatcher()
if err != nil {
return nil, fmt.Errorf("could not create file system watcher: %v", err)