src/filter-component.js
function FilterComponent(filter_json) {
    this.filter_json = filter_json;

    this.types = filter_json.types || null;
    this.not_types = filter_json.not_types || [];

    this.rooms = filter_json.rooms || null;
    this.not_rooms = filter_json.not_rooms || [];

    this.senders = filter_json.senders || null;
    this.not_senders = filter_json.not_senders || [];

    this.contains_url = filter_json.contains_url || null;
}
function FilterComponent(filter_json) {
    this.filter_json = filter_json;

    this.types = filter_json.types || null;
    this.not_types = filter_json.not_types || [];

    this.rooms = filter_json.rooms || null;
    this.not_rooms = filter_json.not_rooms || [];

    this.senders = filter_json.senders || null;
    this.not_senders = filter_json.not_senders || [];

    this.contains_url = filter_json.contains_url || null;
}
function FilterComponent ( filter_json ) { this . filter_json = filter_json ; this . types = filter_json . types || null ; this . not_types = filter_json . not_types || [ ] ; this . rooms = filter_json . rooms || null ; this . not_rooms = filter_json . not_rooms || [ ] ; this . senders = filter_json . senders || null ; this . not_senders = filter_json . not_senders || [ ] ; this . contains_url = filter_json . contains_url || null ; }
FilterComponent is a section of a Filter definition which defines the
types, rooms, senders filters etc to be applied to a particular type of resource.
This is all ported over from synapse's Filter object.

N.B. that synapse refers to these as 'Filters', and what js-sdk refers to as
'Filters' are referred to as 'FilterCollections'.

@constructor
@param {Object} filter_json the definition of this filter JSON, e.g. { 'contains_url': true }
FilterComponent is a section of a Filter definition which defines the types rooms senders filters etc to be applied to a particular type of resource . This is all ported over from synapse s Filter object .