diff options
Diffstat (limited to 'worker/jmap/configure.go')
-rw-r--r-- | worker/jmap/configure.go | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/worker/jmap/configure.go b/worker/jmap/configure.go index 889ef06e..f423ce4b 100644 --- a/worker/jmap/configure.go +++ b/worker/jmap/configure.go @@ -15,8 +15,8 @@ func (w *JMAPWorker) handleConfigure(msg *types.Configure) error { } if strings.HasSuffix(u.Scheme, "+oauthbearer") { - w.oauth = true - w.query = u.Query() + w.config.oauth = true + w.config.query = u.Query() } else { if u.User == nil { return fmt.Errorf("user:password not specified") @@ -29,12 +29,20 @@ func (w *JMAPWorker) handleConfigure(msg *types.Configure) error { u.RawQuery = "" u.Fragment = "" - w.user = u.User + w.config.user = u.User u.User = nil u.Scheme = "https" - w.endpoint = u.String() - w.account = msg.Config + w.config.endpoint = u.String() + w.config.account = msg.Config + switch strings.ToLower(msg.Config.Params["use-labels"]) { + case "1", "t", "true", "yes", "y", "on": + w.config.useLabels = true + } + w.config.allMailName = msg.Config.Params["all-mail-name"] + if w.config.allMailName == "" { + w.config.allMailName = "All mail" + } return nil } |