fix: replace last_added_location_id with last_added_location_timestamp

Stored location ID was not actually used
and locations_last_sent timestamp was updated
with the current time, possibly skipping
locations.
This commit is contained in:
link2xt
2026-07-01 12:02:53 +00:00
committed by l
parent a22ba021e5
commit 5eb5d22d7b
3 changed files with 75 additions and 42 deletions
+3 -4
View File
@@ -2926,10 +2926,9 @@ pub(crate) async fn create_send_msg_jobs(context: &Context, msg: &mut Message) -
let now = time();
if rendered_msg.last_added_location_id.is_some()
&& let Err(err) = location::set_kml_sent_timestamp(context, msg.chat_id, now).await
{
error!(context, "Failed to set kml sent_timestamp: {err:#}.");
if let Some(last_added_location_timestamp) = rendered_msg.last_added_location_timestamp {
location::set_kml_sent_timestamp(context, msg.chat_id, last_added_location_timestamp)
.await?;
}
if attach_selfavatar && let Err(err) = msg.chat_id.set_selfavatar_timestamp(context, now).await