mirror of
https://github.com/pimalaya/himalaya.git
synced 2026-06-18 05:47:54 +08:00
@@ -53,8 +53,10 @@ impl JmapMailboxCreateCommand {
|
||||
let mut create = BTreeMap::new();
|
||||
create.insert(self.name.clone(), new_mailbox);
|
||||
|
||||
let mut args = JmapMailboxSetArgs::default();
|
||||
args.create = Some(create);
|
||||
let args = JmapMailboxSetArgs {
|
||||
create: Some(create),
|
||||
..Default::default()
|
||||
};
|
||||
|
||||
let output = client.mailbox_set(args)?;
|
||||
|
||||
|
||||
@@ -36,9 +36,11 @@ pub struct JmapMailboxDestroyCommand {
|
||||
|
||||
impl JmapMailboxDestroyCommand {
|
||||
pub fn execute(self, printer: &mut impl Printer, mut client: JmapClient) -> Result<()> {
|
||||
let mut args = JmapMailboxSetArgs::default();
|
||||
args.destroy = Some(self.ids.clone());
|
||||
args.on_destroy_remove_emails = if self.purge { Some(true) } else { None };
|
||||
let args = JmapMailboxSetArgs {
|
||||
destroy: Some(self.ids.clone()),
|
||||
on_destroy_remove_emails: if self.purge { Some(true) } else { None },
|
||||
..Default::default()
|
||||
};
|
||||
|
||||
let output = client.mailbox_set(args)?;
|
||||
|
||||
|
||||
@@ -77,8 +77,10 @@ impl JmapMailboxUpdateCommand {
|
||||
let mut update = BTreeMap::new();
|
||||
update.insert(self.id.clone(), patch);
|
||||
|
||||
let mut args = JmapMailboxSetArgs::default();
|
||||
args.update = Some(update);
|
||||
let args = JmapMailboxSetArgs {
|
||||
update: Some(update),
|
||||
..Default::default()
|
||||
};
|
||||
|
||||
let output = client.mailbox_set(args)?;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user