refactor: split is_sending_locations_to_chat() into two functions

This commit is contained in:
link2xt
2026-04-24 23:09:07 +02:00
parent 1ab6645bbc
commit 682dbe9a53
4 changed files with 33 additions and 40 deletions

View File

@@ -573,7 +573,7 @@ pub async fn cmdline(context: Context, line: &str, chat_id: &mut ChatId) -> Resu
);
}
}
if location::is_sending_locations_to_chat(&context, None).await? {
if location::is_sending_locations(&context).await? {
println!("Location streaming enabled.");
}
println!("{cnt} chats");
@@ -783,7 +783,7 @@ pub async fn cmdline(context: Context, line: &str, chat_id: &mut ChatId) -> Resu
"Location streaming: {}",
location::is_sending_locations_to_chat(
&context,
Some(sel_chat.as_ref().unwrap().get_id())
sel_chat.as_ref().unwrap().get_id()
)
.await?,
);