Class: TootFilter

TootFilter(params)

Abstract base class representing a filter that can be applied to a Toot to determine if it should be included in the timeline feed. Subclasses must implement the isAllowed method.

Constructor

new TootFilter(params)

Parameters:
Name Type Description
params FilterArgs The arguments for configuring the filter.
Properties
Name Type Attributes Description
description string <optional>
Optional description of the filter for display or documentation purposes.
invertSelection boolean <optional>
If true, the filter logic is inverted (e.g., exclude instead of include).
propertyName FilterProperty Key identifying what this filter is filtering on.
Properties:
Name Type Description
description string Description of the filter for display or documentation purposes.
invertSelection boolean If true, the filter logic is inverted (e.g., exclude instead of include).
logger Logger Logger instance for this filter.
propertyName FilterProperty The property this filter works on

Methods

toArgs() → {FilterArgs}

Returns the arguments needed to reconstruct this filter. Extend in subclasses for serialization.
Returns:
The arguments representing this filter's configuration.
Type
FilterArgs

(static) isValidFilterProperty()

Must be overridden in subclasses.

(static) removeInvalidFilterArgs()

Remove any filter args from the list whose propertyName is invalid