From 91f0c6e37f3eb4723d69580a0065f83adfb13dc5 Mon Sep 17 00:00:00 2001 From: Teppo Kurki Date: Sun, 31 Dec 2023 10:51:11 +0200 Subject: [PATCH] fix: use multiplexed file timestamps in deltas If the original delta data has timestamps use them, otherwise use the timestamp of the multiplexed data also in deltas instead of letting the server fill in the current time. Fixes #1659. --- packages/streams/autodetect.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/streams/autodetect.js b/packages/streams/autodetect.js index 3c002417e..b18c59e50 100644 --- a/packages/streams/autodetect.js +++ b/packages/streams/autodetect.js @@ -113,6 +113,8 @@ Splitter.prototype._transform = function (msg, encoding, _done) { default: try { const parsed = JSON.parse(msg.data) + const timestamp = new Date(Number(msg.timestamp)) + parsed.updates && parsed.updates.forEach((update) => update.timestamp = timestamp) this.push(parsed) this.demuxEmitData(parsed) } catch (e) {