diff options
Diffstat (limited to 'worker/jmap/state.go')
-rw-r--r-- | worker/jmap/state.go | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/worker/jmap/state.go b/worker/jmap/state.go index 833bd151..3dbab3fb 100644 --- a/worker/jmap/state.go +++ b/worker/jmap/state.go @@ -3,7 +3,6 @@ package jmap import ( "git.sr.ht/~rockorager/go-jmap" "git.sr.ht/~rockorager/go-jmap/mail/mailbox" - "git.sr.ht/~rockorager/go-jmap/mail/thread" ) func (w *JMAPWorker) getMailboxState() (string, error) { @@ -28,28 +27,3 @@ func (w *JMAPWorker) getMailboxState() (string, error) { // This should be an impossibility return "", nil } - -func (w *JMAPWorker) getThreadState() (string, error) { - var req jmap.Request - - // TODO: This is a junk JMAP ID because Go's JSON serialization doesn't - // send empty slices as arrays, WTF. - req.Invoke(&thread.Get{Account: w.accountId, IDs: []jmap.ID{jmap.ID("00")}}) - resp, err := w.Do(&req) - if err != nil { - return "", err - } - - for _, inv := range resp.Responses { - switch r := inv.Args.(type) { - case *thread.GetResponse: - return r.State, nil - case *jmap.MethodError: - return "", wrapMethodError(r) - - } - } - - // This should be an impossibility - return "", nil -} |