Class RelationsContainer

Hierarchy

  • RelationsContainer

Constructors

Properties

client: MatrixClient
relations: Map<string, Map<string, Map<string, Relations>>> = ...
room?: Room

Methods

  • Set an event as the target event if any Relations exist for it already. Child events can point to other child events as their parent, so this method may be called for events which are also logically child events.

    Parameters

    • event: MatrixEvent

      The event to check as relation target.

    Returns void

  • Get a collection of child events to a given event in this timeline set.

    Throws

    If eventId</code>, <code>relationType</code> or <code>eventType are not valid.

    Returns

    A container for relation events or undefined if there are no relation events for the relationType.

    Parameters

    • eventId: string

      The ID of the event that you'd like to access child events for. For example, with annotations, this would be the ID of the event being annotated.

    • relationType: string

      The type of relationship involved, such as "m.annotation", "m.reference", "m.replace", etc.

    • eventType: string

      The relation event's type, such as "m.reaction", etc.

    Returns undefined | Relations

Generated using TypeDoc