Site: notices name the city too; the privacy line says cities are counted
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
0305b3b04b
commit
a1403d04b0
11 changed files with 15 additions and 14 deletions
|
|
@ -620,7 +620,7 @@ async fn api_update(
|
|||
if let (Some(install), Some(version), Some(platform)) = (install, version, platform) {
|
||||
let ip = client_ip(&state.config, peer, &headers);
|
||||
if !is_local(ip) {
|
||||
let (country, _, _) = locate(&state, ip);
|
||||
let (country, region, city) = locate(&state, ip);
|
||||
let day = chrono::Local::now().format("%Y-%m-%d").to_string();
|
||||
// A few new installations a day per address (a family, a classroom); more is
|
||||
// someone making ids up, and is not counted.
|
||||
|
|
@ -673,8 +673,8 @@ async fn api_update(
|
|||
}
|
||||
};
|
||||
let label = platform_label(&platform);
|
||||
// The country only: what the texts about the update check promise.
|
||||
let place = telegram::place(country.as_deref(), None, None);
|
||||
// The city is not kept (the table has the country), only shown here.
|
||||
let place = telegram::place(country.as_deref(), region.as_deref(), city.as_deref());
|
||||
let place = if place.is_empty() { String::new() } else { format!("\n{place}") };
|
||||
match before {
|
||||
_ if known.is_none() => {
|
||||
|
|
@ -782,7 +782,7 @@ async fn download(
|
|||
)
|
||||
.unwrap_or(false);
|
||||
if kind == "human" && asset.platform != "checksums" && !again {
|
||||
let place = telegram::place(c.country.as_deref(), None, None);
|
||||
let place = telegram::place(c.country.as_deref(), c.region.as_deref(), c.city.as_deref());
|
||||
let from = referrer.as_deref().map(|r| format!(" · с {r}")).unwrap_or_default();
|
||||
let line = [place, from.trim_start_matches(" · ").to_owned()]
|
||||
.into_iter()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue