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

unbreak filter text

This commit is contained in:
Matthew Hodgson
2016-08-30 01:30:23 +01:00
parent 0848d4ed10
commit e18b446190
2 changed files with 8 additions and 6 deletions

View File

@@ -40,13 +40,13 @@ function FilterComponent(filter_json) {
this.types = filter_json.types || null;
this.not_types = filter_json.not_types || [];
self.rooms = filter_json.rooms || null;
self.not_rooms = filter_json.not_rooms || [];
this.rooms = filter_json.rooms || null;
this.not_rooms = filter_json.not_rooms || [];
self.senders = filter_json.senders || null;
self.not_senders = filter_json.not_senders || [];
this.senders = filter_json.senders || null;
this.not_senders = filter_json.not_senders || [];
self.contains_url = filter_json.contains_url || null;
this.contains_url = filter_json.contains_url || null;
};
/**

View File

@@ -113,7 +113,9 @@ Filter.prototype.setDefinition = function(definition) {
}
this._room_filter = new FilterComponent(room_filter_fields);
this._room_timeline_filter = new FilterComponent(room_filter_json.timeline || {});
this._room_timeline_filter = new FilterComponent(
room_filter_json ? (room_filter_json.timeline || {}) : {}
);
// don't bother porting this from synapse yet:
// this._room_state_filter = new FilterComponent(room_filter_json.state || {});