mirror of
https://git.sr.ht/~rjarry/aerc
synced 2026-03-02 18:23:33 +01:00
jmap: skip Email/get call if no emails to get
No need to send a JMAP request if there are no object to fetch. Signed-off-by: Tristan Partin <tristan@partin.io> Acked-by: Robin Jarry <robin@jarry.cc> Acked-by: Tim Culverhouse <tim@timculverhouse.com>
This commit is contained in:
committed by
Robin Jarry
parent
659069dd1f
commit
0465509eed
@@ -154,6 +154,10 @@ func (w *JMAPWorker) handleFetchMessageHeaders(msg *types.FetchMessageHeaders) e
|
||||
missing = append(missing, id)
|
||||
}
|
||||
|
||||
if len(missing) == 0 {
|
||||
return nil
|
||||
}
|
||||
|
||||
var req jmap.Request
|
||||
req.Invoke(&email.Get{
|
||||
Account: w.accountId,
|
||||
|
||||
Reference in New Issue
Block a user