mirror of
https://github.com/root-fr/jmap-webmail.git
synced 2026-09-24 00:01:14 +00:00
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:
+1
-3
@@ -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}`,
|
||||
}));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user