@@ -9,18 +9,18 @@ use std::{sync::Arc, time::Instant};
99use directory:: Permission ;
1010use email:: {
1111 ingest:: EmailIngest ,
12- mailbox:: { UidMailbox , JUNK_ID } ,
12+ mailbox:: { JUNK_ID , UidMailbox } ,
1313} ;
1414use imap_proto:: {
15- protocol :: copy_move :: Arguments , receiver :: Request , Command , ResponseCode , ResponseType ,
16- StatusResponse ,
15+ Command , ResponseCode , ResponseType , StatusResponse , protocol :: copy_move :: Arguments ,
16+ receiver :: Request ,
1717} ;
1818
1919use crate :: {
2020 core:: { SelectedMailbox , Session , SessionData } ,
2121 spawn_op,
2222} ;
23- use common:: { listener:: SessionStream , MailboxId } ;
23+ use common:: { MailboxId , listener:: SessionStream } ;
2424use jmap:: email:: { bayes:: EmailBayesTrain , copy:: EmailCopy , set:: TagManager } ;
2525use jmap_proto:: {
2626 error:: set:: SetErrorType ,
@@ -31,7 +31,7 @@ use jmap_proto::{
3131} ;
3232use store:: {
3333 roaring:: RoaringBitmap ,
34- write:: { assert:: HashedValue , log:: ChangeLogBuilder , BatchBuilder , ValueClass , F_VALUE } ,
34+ write:: { BatchBuilder , F_VALUE , ValueClass , assert:: HashedValue , log:: ChangeLogBuilder } ,
3535} ;
3636
3737use super :: ImapContext ;
@@ -110,6 +110,10 @@ impl<T: SessionStream> SessionData<T> {
110110 is_qresync : bool ,
111111 op_start : Instant ,
112112 ) -> trc:: Result < ( ) > {
113+ self . synchronize_messages ( & src_mailbox)
114+ . await
115+ . imap_ctx ( & arguments. tag , trc:: location!( ) ) ?;
116+
113117 // Convert IMAP ids to JMAP ids.
114118 let ids = src_mailbox
115119 . sequence_to_ids ( & arguments. sequence_set , is_uid)
0 commit comments