mirror of
https://git.meli.delivery/meli/meli
synced 2024-11-09 01:10:33 +00:00
melib/jmap: re-add Submission to USING
Submission capability is necessary for Identity retrievals. Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
This commit is contained in:
parent
45bfcf8707
commit
33999fc6ab
@ -62,7 +62,11 @@ pub trait Method<OBJ: Object>: Serialize + Send + Sync {
|
||||
const NAME: &'static str;
|
||||
}
|
||||
|
||||
static USING: &[&str] = &[JmapCoreCapability::uri(), JmapMailCapability::uri()];
|
||||
static USING: &[&str] = &[
|
||||
JmapCoreCapability::uri(),
|
||||
JmapMailCapability::uri(),
|
||||
JmapSubmissionCapability::uri(),
|
||||
];
|
||||
|
||||
#[derive(Serialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
|
@ -66,7 +66,7 @@ fn test_jmap_query() {
|
||||
futures::executor::block_on(req.add_call(&email_call));
|
||||
|
||||
assert_eq!(
|
||||
r#"{"using":["urn:ietf:params:jmap:core","urn:ietf:params:jmap:mail"],"methodCalls":[["Email/query",{"accountId":"account_id","calculateTotal":false,"collapseThreads":false,"filter":{"conditions":[{"inMailbox":"mailbox_id"},{"conditions":[{"subject":"wah"},{"conditions":[{"from":"Manos"},{"conditions":[{"subject":"foo"},{"subject":"bar"}],"operator":"OR"}],"operator":"AND"}],"operator":"OR"}],"operator":"AND"},"position":0,"sort":null},"m0"]]}"#,
|
||||
r#"{"using":["urn:ietf:params:jmap:core","urn:ietf:params:jmap:mail","urn:ietf:params:jmap:submission"],"methodCalls":[["Email/query",{"accountId":"account_id","calculateTotal":false,"collapseThreads":false,"filter":{"conditions":[{"inMailbox":"mailbox_id"},{"conditions":[{"subject":"wah"},{"conditions":[{"from":"Manos"},{"conditions":[{"subject":"foo"},{"subject":"bar"}],"operator":"OR"}],"operator":"AND"}],"operator":"OR"}],"operator":"AND"},"position":0,"sort":null},"m0"]]}"#,
|
||||
serde_json::to_string(&req).unwrap().as_str()
|
||||
);
|
||||
assert_eq!(*futures::executor::block_on(request_no.lock()), 1);
|
||||
@ -269,7 +269,8 @@ fn test_jmap_identity_methods() {
|
||||
],
|
||||
"using" : [
|
||||
"urn:ietf:params:jmap:core",
|
||||
"urn:ietf:params:jmap:mail"
|
||||
"urn:ietf:params:jmap:mail",
|
||||
"urn:ietf:params:jmap:submission"
|
||||
]
|
||||
}},
|
||||
);
|
||||
@ -426,7 +427,8 @@ fn test_jmap_argument_serde() {
|
||||
],
|
||||
"using": [
|
||||
"urn:ietf:params:jmap:core",
|
||||
"urn:ietf:params:jmap:mail"
|
||||
"urn:ietf:params:jmap:mail",
|
||||
"urn:ietf:params:jmap:submission"
|
||||
]
|
||||
}},
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user