lib/client: don't mutate input argument in fetchHistoryBetween()

This commit is contained in:
Simon Ser 2024-11-16 12:45:08 +01:00
parent 75eb175e24
commit 2f1bf8a2fe

View file

@ -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 };