Type alias RoomStateEventHandlerMap

RoomStateEventHandlerMap: {
    Beacon.new: ((event, beacon) => void);
    RoomState.BeaconLiveness: ((state, hasLiveBeacons) => void);
    RoomState.Marker: ((event, setStateOptions?) => void);
    RoomState.events: ((event, state, lastStateEvent) => void);
    RoomState.members: ((event, state, member) => void);
    RoomState.newMember: ((event, state, member) => void);
    RoomState.update: ((state) => void);
}

Type declaration

  • Beacon.new: ((event, beacon) => void)
  • RoomState.BeaconLiveness: ((state, hasLiveBeacons) => void)
      • (state, hasLiveBeacons): void
      • Parameters

        Returns void

  • RoomState.Marker: ((event, setStateOptions?) => void)
  • RoomState.events: ((event, state, lastStateEvent) => void)

    Fires whenever the event dictionary in room state is updated.

    Example

    matrixClient.on("RoomState.events", function(event, state, prevEvent){
    var newStateEvent = event;
    });
      • (event, state, lastStateEvent): void
      • Parameters

        • event: MatrixEvent

          The matrix event which caused this event to fire.

        • state: RoomState

          The room state whose RoomState.events dictionary was updated.

        • lastStateEvent: MatrixEvent | null

        Returns void

  • RoomState.members: ((event, state, member) => void)

    Fires whenever a member in the members dictionary is updated in any way.

    Example

    matrixClient.on("RoomState.members", function(event, state, member){
    var newMembershipState = member.membership;
    });
      • (event, state, member): void
      • Parameters

        • event: MatrixEvent

          The matrix event which caused this event to fire.

        • state: RoomState

          The room state whose RoomState.members dictionary was updated.

        • member: RoomMember

          The room member that was updated.

        Returns void

  • RoomState.newMember: ((event, state, member) => void)

    Fires whenever a member is added to the members dictionary. The RoomMember will not be fully populated yet (e.g. no membership state) but will already be available in the members dictionary.

    Example

    matrixClient.on("RoomState.newMember", function(event, state, member){
    // add event listeners on 'member'
    });
      • (event, state, member): void
      • Parameters

        • event: MatrixEvent

          The matrix event which caused this event to fire.

        • state: RoomState

          The room state whose RoomState.members dictionary was updated with a new entry.

        • member: RoomMember

          The room member that was added.

        Returns void

  • RoomState.update: ((state) => void)
      • (state): void
      • Parameters

        Returns void

Generated using TypeDoc