aboutsummaryrefslogtreecommitdiffstats
path: root/worker/jmap/cache/state.go
diff options
context:
space:
mode:
Diffstat (limited to 'worker/jmap/cache/state.go')
-rw-r--r--worker/jmap/cache/state.go13
1 files changed, 13 insertions, 0 deletions
diff --git a/worker/jmap/cache/state.go b/worker/jmap/cache/state.go
index 5fec5034..e7771075 100644
--- a/worker/jmap/cache/state.go
+++ b/worker/jmap/cache/state.go
@@ -24,7 +24,20 @@ func (c *JMAPCache) PutEmailState(state string) error {
return c.put(emailStateKey, []byte(state))
}
+func (c *JMAPCache) GetThreadState() (string, error) {
+ buf, err := c.get(threadStateKey)
+ if err != nil {
+ return "", err
+ }
+ return string(buf), nil
+}
+
+func (c *JMAPCache) PutThreadState(state string) error {
+ return c.put(threadStateKey, []byte(state))
+}
+
const (
mailboxStateKey = "state/mailbox"
emailStateKey = "state/email"
+ threadStateKey = "state/thread"
)