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'.

Constructors

Properties

Methods

Constructors

Properties

userId?: null | string

Methods

  • Checks with the filter component matches the given event

    Parameters

    • event: MatrixEvent

      event to be checked against the filter

    Returns boolean

    true if the event matches the filter

  • Returns the limit field for a given filter component, providing a default of 10 if none is otherwise specified. Cargo-culted from Synapse.

    Returns number

    the limit for this filter component.

  • Converts the filter component into the form expected over the wire

    Returns object