feat: do not add location markers to messages with non-POI location

This commit is contained in:
link2xt
2024-05-09 18:27:36 +00:00
parent 8a4dff2212
commit 72c09feb64
6 changed files with 22 additions and 18 deletions

View File

@@ -1669,11 +1669,10 @@ async fn save_locations(
if let Some(addr) = &location_kml.addr {
let contact = Contact::get_by_id(context, from_id).await?;
if contact.get_addr().to_lowercase() == addr.to_lowercase() {
if let Some(newest_location_id) =
location::save(context, chat_id, from_id, &location_kml.locations, false)
.await?
if location::save(context, chat_id, from_id, &location_kml.locations, false)
.await?
.is_some()
{
location::set_msg_location_id(context, msg_id, newest_location_id).await?;
send_event = true;
}
} else {