Include correct JMAP capabilities in using
This commit is contained in:
+9
-4
@@ -2,6 +2,15 @@
|
||||
|
||||
All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/).
|
||||
|
||||
## [1.0.4] - 2026-06-XX
|
||||
|
||||
### Added
|
||||
|
||||
### Changed
|
||||
|
||||
### Fixed
|
||||
- Include correct JMAP capabilities in `using`.
|
||||
|
||||
## [1.0.3] - 2026-06-15
|
||||
|
||||
### Added
|
||||
@@ -12,10 +21,6 @@ All notable changes to this project will be documented in this file. This projec
|
||||
- Mailbox roles must be unique per archive (#8).
|
||||
- Google takeout: Decode MIME-encoded values in `X-Gmail-Labels` (#7).
|
||||
|
||||
# Change Log
|
||||
|
||||
All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/).
|
||||
|
||||
## [1.0.2] - 2026-06-11
|
||||
|
||||
### Added
|
||||
|
||||
+3
-1
@@ -18,7 +18,8 @@ pub const URN_CORE: &str = "urn:ietf:params:jmap:core";
|
||||
pub fn using_urn(method: &str) -> &'static str {
|
||||
let prefix = method.split('/').next().unwrap_or(method);
|
||||
match prefix {
|
||||
"Mailbox" | "Email" | "Identity" => "urn:ietf:params:jmap:mail",
|
||||
"Mailbox" | "Email" => "urn:ietf:params:jmap:mail",
|
||||
"Identity" => "urn:ietf:params:jmap:submission",
|
||||
"SieveScript" => "urn:ietf:params:jmap:sieve",
|
||||
"AddressBook" | "ContactCard" => "urn:ietf:params:jmap:contacts",
|
||||
"Calendar" | "CalendarEvent" | "ParticipantIdentity" => "urn:ietf:params:jmap:calendars",
|
||||
@@ -743,6 +744,7 @@ mod tests {
|
||||
using_urn("CalendarEvent/set"),
|
||||
"urn:ietf:params:jmap:calendars"
|
||||
);
|
||||
assert_eq!(using_urn("Identity/get"), "urn:ietf:params:jmap:submission");
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
+2
-3
@@ -66,9 +66,8 @@ impl ObjectType {
|
||||
|
||||
pub fn capability_urn(self) -> &'static str {
|
||||
match self {
|
||||
ObjectType::Mailbox | ObjectType::Email | ObjectType::Identity => {
|
||||
"urn:ietf:params:jmap:mail"
|
||||
}
|
||||
ObjectType::Mailbox | ObjectType::Email => "urn:ietf:params:jmap:mail",
|
||||
ObjectType::Identity => "urn:ietf:params:jmap:submission",
|
||||
ObjectType::SieveScript => "urn:ietf:params:jmap:sieve",
|
||||
ObjectType::AddressBook | ObjectType::ContactCard => "urn:ietf:params:jmap:contacts",
|
||||
ObjectType::Calendar | ObjectType::CalendarEvent | ObjectType::ParticipantIdentity => {
|
||||
|
||||
@@ -16,6 +16,7 @@ use super::jmap::Jmap;
|
||||
|
||||
const CORE: &str = "urn:ietf:params:jmap:core";
|
||||
const MAIL: &str = "urn:ietf:params:jmap:mail";
|
||||
const SUBMISSION: &str = "urn:ietf:params:jmap:submission";
|
||||
const SIEVE: &str = "urn:ietf:params:jmap:sieve";
|
||||
const CONTACTS: &str = "urn:ietf:params:jmap:contacts";
|
||||
const CALENDARS: &str = "urn:ietf:params:jmap:calendars";
|
||||
@@ -239,7 +240,7 @@ fn seed_sieve(jmap: &Jmap, account_id: &str, active: bool) -> SeedResult<()> {
|
||||
|
||||
fn seed_identity(jmap: &Jmap, account_id: &str, account_email: &str) -> SeedResult<()> {
|
||||
jmap.set_create(
|
||||
&[CORE, MAIL],
|
||||
&[CORE, SUBMISSION],
|
||||
"Identity/set",
|
||||
account_id,
|
||||
json!({
|
||||
|
||||
Reference in New Issue
Block a user