lib/client: don't mutate input argument in fetchHistoryBetween()
This commit is contained in:
parent
75eb175e24
commit
2f1bf8a2fe
1 changed files with 1 additions and 1 deletions
|
@ -940,7 +940,7 @@ export default class Client extends EventTarget {
|
||||||
}
|
}
|
||||||
if (messages.length >= max) {
|
if (messages.length >= max) {
|
||||||
// There are still more messages to fetch
|
// 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 await this.fetchHistoryBetween(target, after, before, limit);
|
||||||
}
|
}
|
||||||
return { messages };
|
return { messages };
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue