File tree 3 files changed +10
-6
lines changed
crates/jmap-proto/src/types
3 files changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -112,13 +112,17 @@ impl JsonObjectParser for Keyword {
112
112
113
113
impl From < String > for Keyword {
114
114
fn from ( value : String ) -> Self {
115
- if value. starts_with ( '$' ) {
115
+ if value
116
+ . as_bytes ( )
117
+ . first ( )
118
+ . is_some_and ( |& ch| [ b'$' , b'\\' ] . contains ( & ch) )
119
+ {
116
120
let mut hash = 0 ;
117
121
let mut shift = 0 ;
118
122
119
- for & ch in value. as_bytes ( ) {
123
+ for & ch in value. as_bytes ( ) . iter ( ) . skip ( 1 ) {
120
124
if shift < 128 {
121
- hash |= ( ch as u128 ) << shift;
125
+ hash |= ( ch. to_ascii_lowercase ( ) as u128 ) << shift;
122
126
shift += 8 ;
123
127
} else {
124
128
break ;
Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ if not mailboxexists ["Drafts", "Sent Items"] {
38
38
39
39
# File into new mailboxes using flags
40
40
fileinto :create " INBOX / Folder " ;
41
- fileinto :flags [" $important" , " $seen " ] :create " My/Nested/Mailbox/with/multiple/levels" ;
41
+ fileinto :flags [" $important" , " \\ Seen " ] :create " My/Nested/Mailbox/with/multiple/levels" ;
42
42
43
43
# Make sure all mailboxes were created
44
44
if not mailboxexists " Inbox/Folder" {
Original file line number Diff line number Diff line change @@ -381,14 +381,14 @@ pub async fn jmap_tests() {
381
381
email_query_changes::test(&mut params).await;
382
382
email_copy::test(&mut params).await;
383
383
thread_get::test(&mut params).await;
384
- thread_merge::test(&mut params).await;*/
384
+ thread_merge::test(&mut params).await;
385
385
mailbox::test(&mut params).await;
386
386
delivery::test(&mut params).await;
387
387
auth_acl::test(&mut params).await;
388
388
auth_limits::test(&mut params).await;
389
389
auth_oauth::test(&mut params).await;
390
390
event_source::test(&mut params).await;
391
- push_subscription:: test ( & mut params) . await ;
391
+ push_subscription::test(&mut params).await;*/
392
392
sieve_script:: test ( & mut params) . await ;
393
393
vacation_response:: test ( & mut params) . await ;
394
394
email_submission:: test ( & mut params) . await ;
You can’t perform that action at this time.
0 commit comments