From c1c9fd2cd6bfc08b4d0d968861a08c8d96047c79 Mon Sep 17 00:00:00 2001 From: "B. Petersen" Date: Fri, 12 Apr 2024 19:08:40 +0200 Subject: [PATCH] use time window as expected by current .xdc --- src/webxdc/maps_integration.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/webxdc/maps_integration.rs b/src/webxdc/maps_integration.rs index 9fb97eb631..df70be3173 100644 --- a/src/webxdc/maps_integration.rs +++ b/src/webxdc/maps_integration.rs @@ -41,6 +41,7 @@ use crate::message::{Message, MsgId, Viewtype}; use crate::chat::ChatId; use crate::color::color_int_to_hex_string; use crate::contact::{Contact, ContactId}; +use crate::tools::time; use crate::webxdc::{StatusUpdateItem, StatusUpdateItemAndSerial, StatusUpdateSerial}; use anyhow::Result; use serde::{Deserialize, Serialize}; @@ -103,7 +104,8 @@ pub(crate) async fn intercept_get_updates( let mut json = String::default(); let mut contact_data: HashMap = HashMap::new(); - let locations = location::get_range(context, chat_id, None, 0, 0).await?; + let begin = time() - 24 * 60 * 60; + let locations = location::get_range(context, chat_id, None, begin, 0).await?; for location in locations.iter().rev() { if location.location_id > last_known_serial.to_u32() { let (name, color) = match contact_data.entry(location.contact_id) {