1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-11-28 05:03:59 +03:00

shallow-clone the filter, so the timeline filter doesnt get written into it later on

This commit is contained in:
Bruno Windels
2018-09-03 15:02:38 +02:00
parent d29524ba3f
commit 3363cc4f1d

View File

@@ -2145,7 +2145,7 @@ function(roomId, fromToken, limit, dir, timelineFilter = undefined) {
let filter = null; let filter = null;
if (this._clientOpts.lazyLoadMembers) { if (this._clientOpts.lazyLoadMembers) {
filter = LAZY_LOADING_MESSAGES_FILTER; filter = Object.assign({}, LAZY_LOADING_MESSAGES_FILTER);
} }
if (timelineFilter) { if (timelineFilter) {
// XXX: it's horrific that /messages' filter parameter doesn't match // XXX: it's horrific that /messages' filter parameter doesn't match