From 2f1bf8a2fe87660a37cf92a179f590c8493ee983 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Sat, 16 Nov 2024 12:45:08 +0100 Subject: [PATCH] lib/client: don't mutate input argument in fetchHistoryBetween() --- lib/client.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/client.js b/lib/client.js index a0ee321..cfbf23c 100644 --- a/lib/client.js +++ b/lib/client.js @@ -940,7 +940,7 @@ export default class Client extends EventTarget { } if (messages.length >= max) { // There are still more messages to fetch - after.time = messages[messages.length - 1].tags.time; + after = { ...after, time: messages[messages.length - 1].tags.time }; return await this.fetchHistoryBetween(target, after, before, limit); } return { messages };