aboutsummaryrefslogtreecommitdiffstats
path: root/worker/jmap/state.go
diff options
context:
space:
mode:
authorRobin Jarry <robin@jarry.cc>2024-06-28 23:49:20 +0200
committerRobin Jarry <robin@jarry.cc>2024-06-29 00:18:18 +0200
commit446d5303b9c7e7100261fe444bf42319e25e228e (patch)
tree11f65d83bed2fd503d8eeedb30ce023cb0409d82 /worker/jmap/state.go
parent7f833baa90bf6521997c70557a1534dc7528ce0d (diff)
downloadaerc-446d5303b9c7e7100261fe444bf42319e25e228e.tar.gz
jmap: revert fetch threads support
This reverts commits: 9e93d9efdb88 ("jmap: fix go static check failure") 0465509eedad ("jmap: skip Email/get call if no emails to get") 9f97c698e3dd ("jmap: fetch entire threads") Issues have been reported about disappearing sent messages. Reported-by: Tristan Partin <tristan@partin.io> Signed-off-by: Robin Jarry <robin@jarry.cc> Acked-by: Tristan Partin <tristan@partin.io>
Diffstat (limited to 'worker/jmap/state.go')
-rw-r--r--worker/jmap/state.go26
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
-}