Options
All
  • Public
  • Public/Protected
  • All
Menu

Class BridgeInfoStateSyncer<BridgeMappingInfo>

This class ensures that rooms contain a valid bridge info event (MSC2346) which displays the connected protocol, network and room.

Type parameters

  • BridgeMappingInfo

Hierarchy

  • BridgeInfoStateSyncer

Index

Constructors

constructor

  • new BridgeInfoStateSyncer<BridgeMappingInfo>(bridge: Bridge, opts: Opts<BridgeMappingInfo>): BridgeInfoStateSyncer<BridgeMappingInfo>

Properties

Static Readonly EventType

EventType: "uk.half-shot.bridge" = "uk.half-shot.bridge"

Methods

createBridgeInfoContent

createInitialState

  • createInitialState(roomId: string, bridgeMappingInfo: BridgeMappingInfo): Promise<{ content: MSC2346Content; state_key: string; type: string }>

createStateKey

initialSync

  • initialSync(allMappings: Record<string, BridgeMappingInfo[]>, concurrency?: number): Promise<void>
  • Check all rooms and ensure they have correct state.

    Parameters

    • allMappings: Record<string, BridgeMappingInfo[]>

      All bridged room mappings

    • concurrency: number = 3

      How many rooms to handle at a time, defaults to 3.

    Returns Promise<void>

Generated using TypeDoc