Hierarchy

  • PushProcessor

Constructors

Properties

client: MatrixClient

The Matrix client object to use

cachedGlobToRegex: Record<string, RegExp> = {}

Methods

  • Parameters

    • prefix: string
    • glob: string
    • suffix: string

    Returns RegExp

  • Get one of the users push rules by its ID

    Returns

    The push rule, or null if no such rule was found

    Parameters

    • ruleId: string

      The ID of the rule to search for

    Returns null | IPushRule

  • Convert a list of actions into a object with the actions as keys and their values

    Example

    eg. [ 'notify', { set_tweak: 'sound', value: 'default' } ] becomes { notify: true, tweaks: { sound: 'default' } }

    Returns

    A object with key 'notify' (true or false) and an object of actions

    Parameters

    Returns IActionsObject

  • Rewrites conditions on a client's push rules to match the defaults where applicable. Useful for upgrading push rules to more strict conditions when the server is falling behind on defaults.

    Returns

    The rewritten rules

    Parameters

    • incomingRules: IPushRules

      The client's existing push rules

    Returns IPushRules

Generated using TypeDoc