fix: Remove partId from attachment objects to comply with JMAP spec

JMAP spec states "The client may specify a partId OR a blobId, but not both."
We were incorrectly including both fields, causing "Cannot specify both partId
and blobId" errors when creating drafts with attachments.

Fixed by removing partId and size fields from attachment objects. The server
calculates size automatically from the blob content.
This commit is contained in:
Matthieu MALVACHE
2025-10-02 13:11:27 +02:00
parent 8b52fa4719
commit a453585e2d
+1 -3
View File
@@ -600,13 +600,11 @@ export class JMAPClient {
// Add attachments if provided
if (attachments && attachments.length > 0) {
emailData.attachments = attachments.map((att, index) => ({
emailData.attachments = attachments.map(att => ({
blobId: att.blobId,
type: att.type,
name: att.name,
size: att.size,
disposition: "attachment",
partId: `att-${index}`,
}));
}