mirror of
https://github.com/chatmail/core.git
synced 2026-04-26 01:46:34 +03:00
implement receive-backup
This commit is contained in:
@@ -336,6 +336,7 @@ pub async fn cmdline(context: Context, line: &str, chat_id: &mut ChatId) -> Resu
|
||||
has-backup\n\
|
||||
export-backup\n\
|
||||
send-backup\n\
|
||||
receive-backup <ticket>\n\
|
||||
import-backup <backup-file>\n\
|
||||
export-keys\n\
|
||||
import-keys\n\
|
||||
@@ -491,6 +492,11 @@ pub async fn cmdline(context: Context, line: &str, chat_id: &mut ChatId) -> Resu
|
||||
tokio::time::sleep(std::time::Duration::from_secs(100)).await;
|
||||
sender.close().await?;
|
||||
}
|
||||
"receive-backup" => {
|
||||
ensure!(!arg1.is_empty(), "Argument <ticket> is missing.");
|
||||
let (_, ticket) = multibase::decode(&arg1.to_string())?;
|
||||
receive_backup(&context, ticket, Some(arg2.to_string())).await?;
|
||||
}
|
||||
"import-backup" => {
|
||||
ensure!(!arg1.is_empty(), "Argument <backup-file> missing.");
|
||||
imex(
|
||||
|
||||
Reference in New Issue
Block a user