JMAP Registry API implementation - part 8

This commit is contained in:
mdecimus
2026-03-03 18:39:31 +01:00
parent 08f1a8013a
commit 92c60fff7a
56 changed files with 1760 additions and 501 deletions

View File

@@ -20,9 +20,12 @@ use crate::{
};
use common::{Server, storage::index::ObjectIndexBuilder};
use mail_parser::parsers::fields::thread::thread_name;
use registry::schema::{
enums::IndexDocumentType,
structs::{Task, TaskIndexDocument, TaskMergeThreads, TaskStatus},
use registry::{
schema::{
enums::IndexDocumentType,
structs::{Task, TaskIndexDocument, TaskMergeThreads, TaskStatus},
},
types::map::Map,
};
use store::write::{BatchBuilder, IndexPropertyClass, ValueClass};
use store::{
@@ -218,11 +221,13 @@ impl EmailCopy for Server {
account_id: to_account_id.into(),
document_id: document_id.into(),
status: TaskStatus::now(),
thread_ids: thread_result
.merge_ids
.into_iter()
.map(|id| id.into())
.collect(),
thread_ids: Map::new(
thread_result
.merge_ids
.into_iter()
.map(|id| id.into())
.collect(),
),
thread_hash: thread_result.thread_hash.to_string(),
}));
}

View File

@@ -30,7 +30,7 @@ use registry::{
prelude::{ObjectType, Permission, Property},
structs::{SpamTrainingSample, Task, TaskIndexDocument, TaskMergeThreads, TaskStatus},
},
types::{EnumImpl, datetime::UTCDateTime, id::ObjectId},
types::{EnumImpl, datetime::UTCDateTime, id::ObjectId, map::Map},
};
use std::future::Future;
use std::{borrow::Cow, cmp::Ordering, fmt::Write, time::Instant};
@@ -676,11 +676,13 @@ impl EmailIngest for Server {
account_id: account_id.into(),
document_id: document_id.into(),
status: TaskStatus::now(),
thread_ids: thread_result
.merge_ids
.into_iter()
.map(|id| id.into())
.collect(),
thread_ids: Map::new(
thread_result
.merge_ids
.into_iter()
.map(|id| id.into())
.collect(),
),
thread_hash: thread_result.thread_hash.to_string(),
}));
}