summary refs log tree commit diff stats
path: root/worker/imap/worker.go
diff options
context:
space:
mode:
Diffstat (limited to 'worker/imap/worker.go')
-rw-r--r--worker/imap/worker.go9
1 files changed, 2 insertions, 7 deletions
diff --git a/worker/imap/worker.go b/worker/imap/worker.go
index 14e4004..080927d 100644
--- a/worker/imap/worker.go
+++ b/worker/imap/worker.go
@@ -18,13 +18,8 @@ func NewIMAPWorker() *IMAPWorker {
 	}
 }
 
-func (w *IMAPWorker) GetMessage() types.WorkerMessage {
-	select {
-	case msg := <-w.messages:
-		return msg
-	default:
-		return nil
-	}
+func (w *IMAPWorker) GetMessages() chan types.WorkerMessage {
+	return w.messages
 }
 
 func (w *IMAPWorker) PostAction(msg types.WorkerMessage) {