Files
jmap-webmail/lib/jmap
Roy Petter Dyrdahl Torgersen 76cebb7905 fix(contacts): batch ContactCard/get to respect maxObjectsInGet
Contact loading silently returned empty when the address book held
more entries than the server's maxObjectsInGet (Stalwart defaults to
500). Replace the single back-reference get with a two-step flow:
query IDs first, then pack a batched get into one JMAP request. All
batches ride a single HTTP roundtrip via multiple method calls.
Address books at or under the server cap still get a single method
call, so no behavior change for small lists.

Adds getMaxObjectsInGet() capability helper that mirrors the existing
getMaxCallsInRequest() / getMaxSizeUpload() shape. 83 new test cases
cover single-batch, exact-boundary, over-cap, and direct-ids paths.

Closes #45. Credits #46 (@capitanroy).
2026-04-16 23:04:57 +02:00
..