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

Hierarchy

  • FilterComponent

Constructors

Properties

filterJson: IFilterComponent
userId?: null | string

Methods

  • Parameters

    • filter: any[]
    • values: any[]

    Returns boolean

  • Checks with the filter component matches the given event

    Returns

    true if the event matches the filter

    Parameters

    • event: MatrixEvent

      event to be checked against the filter

    Returns boolean

  • Checks whether the filter component matches the given event fields.

    Returns

    true if the event fields match the filter

    Parameters

    • roomId: undefined | string

      the roomId for the event being checked

    • sender: undefined | string

      the sender of the event being checked

    • eventType: string

      the type of the event being checked

    • containsUrl: boolean

      whether the event contains a content.url field

    • relationTypes: string[]

      whether has aggregated relation of the given type

    • relationSenders: string[]

      whether one of the relation is sent by the user listed

    Returns boolean

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

    Returns

    the limit for this filter component.

    Returns number

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

    Returns object

Generated using TypeDoc