feat(deltachat-repl): add fetch command to test background_fetch()

This commit is contained in:
link2xt
2024-10-04 15:52:46 +00:00
parent 8a88479d8f
commit 129be3aa27
2 changed files with 6 additions and 1 deletions

View File

@@ -355,6 +355,7 @@ pub async fn cmdline(context: Context, line: &str, chat_id: &mut ChatId) -> Resu
configure\n\ configure\n\
connect\n\ connect\n\
disconnect\n\ disconnect\n\
fetch\n\
connectivity\n\ connectivity\n\
maybenetwork\n\ maybenetwork\n\
housekeeping\n\ housekeeping\n\

View File

@@ -168,7 +168,7 @@ const IMEX_COMMANDS: [&str; 13] = [
"stop", "stop",
]; ];
const DB_COMMANDS: [&str; 10] = [ const DB_COMMANDS: [&str; 11] = [
"info", "info",
"set", "set",
"get", "get",
@@ -176,6 +176,7 @@ const DB_COMMANDS: [&str; 10] = [
"configure", "configure",
"connect", "connect",
"disconnect", "disconnect",
"fetch",
"connectivity", "connectivity",
"maybenetwork", "maybenetwork",
"housekeeping", "housekeeping",
@@ -417,6 +418,9 @@ async fn handle_cmd(
"disconnect" => { "disconnect" => {
ctx.stop_io().await; ctx.stop_io().await;
} }
"fetch" => {
ctx.background_fetch().await?;
}
"configure" => { "configure" => {
ctx.configure().await?; ctx.configure().await?;
} }