Skip to content

Commit 9fc8048

Browse files
author
Germain
authored
Fix incorrect toJSON for filter-component (#2231)
1 parent 9058dbf commit 9fc8048

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

src/filter-component.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,11 @@ limitations under the License.
1616

1717
import { RelationType } from "./@types/event";
1818
import { MatrixEvent } from "./models/event";
19-
import { FILTER_RELATED_BY_REL_TYPES, FILTER_RELATED_BY_SENDERS, THREAD_RELATION_TYPE } from "./models/thread";
19+
import {
20+
FILTER_RELATED_BY_REL_TYPES,
21+
FILTER_RELATED_BY_SENDERS,
22+
THREAD_RELATION_TYPE,
23+
} from "./models/thread";
2024

2125
/**
2226
* @module filter-component
@@ -111,10 +115,8 @@ export class FilterComponent {
111115
"senders": this.filterJson.senders || null,
112116
"not_senders": this.filterJson.not_senders || [],
113117
"contains_url": this.filterJson.contains_url || null,
114-
"related_by_senders": this.filterJson.related_by_rel_types || [],
115-
"related_by_rel_types": this.filterJson.related_by_rel_types || [],
116-
"io.element.relation_senders": this.filterJson["io.element.relation_senders"] || [],
117-
"io.element.relation_types": this.filterJson["io.element.relation_types"] || [],
118+
[FILTER_RELATED_BY_SENDERS.name]: this.filterJson[FILTER_RELATED_BY_SENDERS.name] || [],
119+
[FILTER_RELATED_BY_REL_TYPES.name]: this.filterJson[FILTER_RELATED_BY_REL_TYPES.name] || [],
118120
};
119121
}
120122

0 commit comments

Comments
 (0)