about summary refs log tree commit diff stats
path: root/worker/worker.go
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2019-05-20 19:20:20 -0400
committerDrew DeVault <sir@cmpwn.com>2019-05-20 19:28:04 -0400
commit2dc436555d8bfa6f2409173d87cd0fec2b2385cf (patch)
tree73e589fc1ff64fa5f4362a9500a739703ea6a27c /worker/worker.go
parentcc90cd21610e7c78bc2cd9b04840fa1266617e6f (diff)
downloadaerc-2dc436555d8bfa6f2409173d87cd0fec2b2385cf.tar.gz
Load IMAP worker for imap+insecure
Diffstat (limited to 'worker/worker.go')
-rw-r--r--worker/worker.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/worker/worker.go b/worker/worker.go
index 2a43083..7db7be5 100644
--- a/worker/worker.go
+++ b/worker/worker.go
@@ -7,6 +7,7 @@ import (
 	"fmt"
 	"log"
 	"net/url"
+	"strings"
 )
 
 // Guesses the appropriate worker type based on the given source string
@@ -16,7 +17,12 @@ func NewWorker(source string, logger *log.Logger) (*types.Worker, error) {
 		return nil, err
 	}
 	worker := types.NewWorker(logger)
-	switch u.Scheme {
+	scheme := u.Scheme
+	if strings.ContainsRune(scheme, '+') {
+		scheme = scheme[:strings.IndexRune(scheme, '+')]
+		fmt.Println(scheme)
+	}
+	switch scheme {
 	case "imap":
 		fallthrough
 	case "imaps":
98453250bc514b333b1768a6c'>513e8aa ^
62946ff ^
513e8aa ^

62946ff ^
513e8aa ^
62946ff ^

513e8aa ^







62946ff ^
513e8aa ^
62946ff ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45