Interface RoomUpgradeHandlerOpts

interface RoomUpgradeHandlerOpts {
    consumeEvent: boolean;
    migrateEntry?: ((entry, newRoomId) => Promise<null | RoomBridgeStoreEntry>);
    migrateGhosts: boolean;
    migrateStoreEntries: boolean;
    onRoomMigrated?: ((oldRoomId, newRoomId) => void | Promise<void>);
}

Properties

consumeEvent: boolean

Should upgrade and invite events be processed after being handled by the RoomUpgradeHandler. Defaults to false.

migrateEntry?: ((entry, newRoomId) => Promise<null | RoomBridgeStoreEntry>)

Invoked when iterating around a rooms entries. Should be used to update entries with a new room id.

Type declaration

    • (entry, newRoomId): Promise<null | RoomBridgeStoreEntry>
    • Invoked when iterating around a rooms entries. Should be used to update entries with a new room id.

      Parameters

      Returns Promise<null | RoomBridgeStoreEntry>

      Return the entry to upsert it, or null to ignore it.

Param: entry

The existing entry.

Param: newRoomId

The new roomId.

Returns

Return the entry to upsert it, or null to ignore it.

migrateGhosts: boolean

Should ghost users be migrated to the new room. This will leave any users matching the user regex list in the registration file from the old room, and join them to the new room. Defaults to true

migrateStoreEntries: boolean

Migrate room store entries automatically. Defaults to true

onRoomMigrated?: ((oldRoomId, newRoomId) => void | Promise<void>)

Invoked after a room has been upgraded and its entries updated.

Type declaration

    • (oldRoomId, newRoomId): void | Promise<void>
    • Invoked after a room has been upgraded and its entries updated.

      Parameters

      • oldRoomId: string

        The old roomId.

      • newRoomId: string

        The new roomId.

      Returns void | Promise<void>

Param: oldRoomId

The old roomId.

Param: newRoomId

The new roomId.

Generated using TypeDoc