diff --git a/melib/src/jmap/mod.rs b/melib/src/jmap/mod.rs index a0867c4e..9fac1407 100644 --- a/melib/src/jmap/mod.rs +++ b/melib/src/jmap/mod.rs @@ -461,7 +461,7 @@ impl MailBackend for JmapType { let import_call: ImportCall = ImportCall::new() .account_id(conn.mail_account_id()) .emails(indexmap! { - creation_id.clone() => EmailImport::new() + creation_id.clone() => EmailImportObject::new() .blob_id(upload_response.blob_id) .mailbox_ids(indexmap! { mailbox_id => true diff --git a/melib/src/jmap/objects/email/import.rs b/melib/src/jmap/objects/email/import.rs index cc47e72c..1d66bd42 100644 --- a/melib/src/jmap/objects/email/import.rs +++ b/melib/src/jmap/objects/email/import.rs @@ -49,12 +49,12 @@ pub struct ImportCall { pub if_in_state: Option>, /// o emails: `Id[EmailImport]` /// A map of creation id (client specified) to EmailImport objects. - pub emails: IndexMap, EmailImport>, + pub emails: IndexMap, EmailImportObject>, } #[derive(Deserialize, Serialize, Debug)] #[serde(rename_all = "camelCase")] -pub struct EmailImport { +pub struct EmailImportObject { /// o blobId: `Id` /// The id of the blob containing the raw message `RFC5322`. pub blob_id: Id, @@ -88,7 +88,7 @@ impl ImportCall { account_id: Id ); _impl!(if_in_state: Option>); - _impl!(emails: IndexMap, EmailImport>); + _impl!(emails: IndexMap, EmailImportObject>); } impl Default for ImportCall { @@ -101,7 +101,7 @@ impl Method for ImportCall { const NAME: &'static str = "Email/import"; } -impl EmailImport { +impl EmailImportObject { pub fn new() -> Self { Self { blob_id: Id::empty(), @@ -117,13 +117,13 @@ impl EmailImport { _impl!(received_at: Option); } -impl Default for EmailImport { +impl Default for EmailImportObject { fn default() -> Self { Self::new() } } -#[derive(Deserialize, Serialize, Debug)] +#[derive(Deserialize, Serialize, Clone, Debug)] #[serde(rename_all = "camelCase")] #[serde(tag = "type")] pub enum ImportError {