Class RelationsContainer

Hierarchy

  • RelationsContainer

Constructors

Properties

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

Methods

  • Add relation events to the relevant relation collection.

    Parameters

    • event: MatrixEvent

      The new child event to be aggregated.

    • Optional timelineSet: EventTimelineSet

      The event timeline set within which to search for the related event if any.

    Returns void

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

    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

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

    Throws

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

Generated using TypeDoc