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

Fix incorrect toJSON for filter-component (#2231)

This commit is contained in:
Germain
2022-03-11 10:46:18 +00:00
committed by GitHub
parent 9058dbf289
commit 9fc8048c30

View File

@@ -16,7 +16,11 @@ limitations under the License.
import { RelationType } from "./@types/event"; import { RelationType } from "./@types/event";
import { MatrixEvent } from "./models/event"; import { MatrixEvent } from "./models/event";
import { FILTER_RELATED_BY_REL_TYPES, FILTER_RELATED_BY_SENDERS, THREAD_RELATION_TYPE } from "./models/thread"; import {
FILTER_RELATED_BY_REL_TYPES,
FILTER_RELATED_BY_SENDERS,
THREAD_RELATION_TYPE,
} from "./models/thread";
/** /**
* @module filter-component * @module filter-component
@@ -111,10 +115,8 @@ export class FilterComponent {
"senders": this.filterJson.senders || null, "senders": this.filterJson.senders || null,
"not_senders": this.filterJson.not_senders || [], "not_senders": this.filterJson.not_senders || [],
"contains_url": this.filterJson.contains_url || null, "contains_url": this.filterJson.contains_url || null,
"related_by_senders": this.filterJson.related_by_rel_types || [], [FILTER_RELATED_BY_SENDERS.name]: this.filterJson[FILTER_RELATED_BY_SENDERS.name] || [],
"related_by_rel_types": this.filterJson.related_by_rel_types || [], [FILTER_RELATED_BY_REL_TYPES.name]: this.filterJson[FILTER_RELATED_BY_REL_TYPES.name] || [],
"io.element.relation_senders": this.filterJson["io.element.relation_senders"] || [],
"io.element.relation_types": this.filterJson["io.element.relation_types"] || [],
}; };
} }