Issue Description
I’m currently trying to implement a jmap-client. If I let the user create a mailbox, then the server sends me this back:
Mailbox {
_create_id: None,
_state: PhantomData<jmap_client::Get>,
id: Some(
"i",
),
name: None,
parent_id: None,
role: None,
sort_order: None,
total_emails: None,
unread_emails: None,
total_threads: None,
unread_threads: None,
my_rights: None,
is_subscribed: None,
share_with: None,
acl_patch: None,
}
Expected Behavior
That the server-set attributes are set:
totalEmailsunreadEmailstotalThreadsunreadThreadsmyRights
as listed in the jmap specification.
Actual Behavior
From the reproduction steps below I’m getting the following output:
SetResponse {
account_id: Some(
"b",
),
old_state: Some(
"s7qaq",
),
new_state: Some(
"s7uaq",
),
created: Some(
{
"yeehaw": Mailbox {
_create_id: None,
_state: PhantomData<jmap_client::Get>,
id: Some(
"j",
),
name: None,
parent_id: None,
role: None,
sort_order: None,
total_emails: None,
unread_emails: None,
total_threads: None,
unread_threads: None,
my_rights: None,
is_subscribed: None,
share_with: None,
acl_patch: None,
},
},
),
updated: None,
destroyed: None,
not_created: None,
not_updated: None,
not_destroyed: None,
}
Reproduction Steps
- Create new rust project with
cargo new rust-sandbox - Add dependencies in
Cargo.toml:
[package]
name = "rust-sandbox"
version = "0.1.0"
edition = "2021"
[dependencies]
jmap-client = "0.4.3"
tokio = { version = "1.54.1", features = ["full"] }
- Add the following code in
main.rs
use jmap_client::client::Client;
#[tokio::main]
async fn main() {
const SERVER_URL: &str = "http://127.0.0.1:8080";
let client = Client::new()
.credentials(("[email protected]", "password"))
.follow_redirects(["127.0.0.1"])
.connect(SERVER_URL)
.await
.unwrap();
let tmp_id = "yeehaw";
let response = {
let mut request = client.build();
request
.set_mailbox()
.create_with_id(tmp_id)
.name("awesome-name")
.sort_order(42)
.parent_id(None::<String>);
request.send_set_mailbox().await.unwrap()
};
println!("{:#?}", response);
}
- Run with
cargo run
Stalwart Version
v1.x
Installation Method
Docker
Database Backend
RocksDB
Blob Storage
RocksDB
Search Engine
Internal
Directory Backend
Internal
I have reviewed the documentation and FAQ and confirm that my issue is NOT addressed there.
on
I have searched this support forum (open and closed topics) and confirm this is not a duplicate.
on
I understand that topics in this category are triaged by a bot first but a human reply will follow up. If I’d prefer a human-only reply, I’ll add the no-ai tag to my topic.
on