fix: reject unusable location timestamps

This commit is contained in:
torlando-agent[bot]
2026-08-07 01:23:28 +00:00
parent c44aabb8fd
commit 3a4fef7168
4 changed files with 46 additions and 2 deletions
@@ -56,6 +56,16 @@ LocationMessageDecision classifyInboundLocationMessage(
return decision;
}
if (!isValidPeerLocationInput(decision.location,
decision.meta,
message.received_at_millis)) {
decision.kind = LocationMessageKind::MALFORMED_LOCATION;
decision.log_malformed = true;
setChatActions(decision, human_text);
decision.drop = !human_text;
return decision;
}
decision.kind = decision.meta.has_cease && decision.meta.cease
? LocationMessageKind::VALID_CEASE
: LocationMessageKind::VALID_LOCATION;