Skip to content

Commit

Permalink
feat: honor timestamp from location message
Browse files Browse the repository at this point in the history
  • Loading branch information
coderbyheart committed Feb 21, 2025
1 parent 743242c commit b0cf5ba
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/context/WebsocketConnection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ type Message = {
| {
'@context': MessageContext.DeviceLocation
location: GeoLocation
ts: number
}
| {
'@context': MessageContext.DeviceShadow
Expand Down Expand Up @@ -128,7 +129,7 @@ export const Provider = ({ children }: { children: ComponentChildren }) => {
message.deviceId,
{
...message.location,
ts: new Date(),
ts: new Date(message.ts),
},
message.location.source,
)
Expand Down

0 comments on commit b0cf5ba

Please sign in to comment.