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 fa68c1f0e4
commit 4b83e84bb9
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");
@@ -782,7 +782,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?,
);