aboutsummaryrefslogtreecommitdiff
path: root/worker/types/messages.go
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2019-05-15 19:41:21 -0400
committerDrew DeVault <sir@cmpwn.com>2019-05-15 19:41:21 -0400
commitb0bf09b98fc038c1bc9921d568c06260b7448a15 (patch)
treeacad72b3ec224d95c551a11ba35cf4e8522641e1 /worker/types/messages.go
parent52b318127fe7ec001ca824947193b2cb7b0ebda6 (diff)
Copy sent emails to the Sent folder
Or rather, to a user-specified folder
Diffstat (limited to 'worker/types/messages.go')
-rw-r--r--worker/types/messages.go20
1 files changed, 20 insertions, 0 deletions
diff --git a/worker/types/messages.go b/worker/types/messages.go
index e97ae02..8687b5e 100644
--- a/worker/types/messages.go
+++ b/worker/types/messages.go
@@ -12,10 +12,13 @@ import (
type WorkerMessage interface {
InResponseTo() WorkerMessage
+ getId() int
+ setId(id int)
}
type Message struct {
inResponseTo WorkerMessage
+ id int
}
func RespondTo(msg WorkerMessage) Message {
@@ -28,6 +31,14 @@ func (m Message) InResponseTo() WorkerMessage {
return m.inResponseTo
}
+func (m Message) getId() int {
+ return m.id
+}
+
+func (m Message) setId(id int) {
+ m.id = id
+}
+
// Meta-messages
type Done struct {
@@ -103,6 +114,15 @@ type CopyMessages struct {
Uids imap.SeqSet
}
+type AppendMessage struct {
+ Message
+ Destination string
+ Flags []string
+ Date time.Time
+ Reader io.Reader
+ Length int
+}
+
// Messages
type CertificateApprovalRequest struct {