Options
All
  • Public
  • Public/Protected
  • All
Menu

The EncryptedEventBroker ensures that we provide a single encrypted event to bridges from potentially multiple /sync responses. The broker is also responsible for starting these syncs depending on which users can read the room.

More broadly speaking, the bridge handles encrypted events currently by listening over the AS stream for encrypted messages, and then spinning up a /sync in order to read the message. In order to decrypt them, we proxy these requests through https://github.com/matrix-org/pantalaimon.

+-------------------+ | Homeserver | +--------+----------+ ^ | Proxy | | +--------+----------+ | Pantalaimon | +--------+----------+ ^ /sync requests | | +--------+----------+ | Bridge | +-------------------+

We also gain things like presence, read receipts and typing for free.

Hierarchy

  • EncryptedEventBroker

Index

Constructors

constructor

Methods

close

  • close(): void

onASEvent

  • onASEvent(event: WeakEvent): Promise<boolean>

shouldAvoidCull

  • shouldAvoidCull(intent: Intent): boolean

startSyncingUser

  • startSyncingUser(userId: string): Promise<void>
  • Start a sync loop for a given bridge user

    Parameters

    • userId: string

      The user whos matrix client should start syncing

    Returns Promise<void>

Static supportsLoginFlow

  • supportsLoginFlow(loginFlows: { flows: { type: string }[] }): undefined | { type: string }
  • Parameters

    • loginFlows: { flows: { type: string }[] }
      • flows: { type: string }[]

    Returns undefined | { type: string }

Generated using TypeDoc