Type Alias RoomStateEventHandlerMap

RoomStateEventHandlerMap: {
    Beacon.new: ((event: MatrixEvent, beacon: Beacon) => void);
    RoomState.BeaconLiveness: ((state: RoomState, hasLiveBeacons: boolean) => void);
    RoomState.events: ((event: MatrixEvent, state: RoomState, prevEvent: MatrixEvent | null) => void);
    RoomState.Marker: ((event: MatrixEvent, setStateOptions?: IMarkerFoundOptions) => void);
    RoomState.members: ((event: MatrixEvent, state: RoomState, member: RoomMember) => void);
    RoomState.newMember: ((event: MatrixEvent, state: RoomState, member: RoomMember) => void);
    RoomState.update: ((state: RoomState) => void);
}

Type declaration

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

        Returns void

  • RoomState.events: ((event: MatrixEvent, state: RoomState, prevEvent: MatrixEvent | null) => void)

    Fires whenever the event dictionary in room state is updated. This does not guarantee that any related objects (like RoomMember) have been updated. Use RoomStateEvent.Update for that.

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

        • event: MatrixEvent

          The matrix event which caused this event to fire.

        • state: RoomState

          The room state whose RoomState.events dictionary was updated.

        • prevEvent: MatrixEvent | null

          The event being replaced by the new state, if known. Note that this can differ from getPrevContent() on the new state event as this is the store's view of the last state, not the previous state provided by the server.

        Returns void

  • RoomState.Marker: ((event: MatrixEvent, setStateOptions?: IMarkerFoundOptions) => void)
  • RoomState.members: ((event: MatrixEvent, state: RoomState, member: RoomMember) => void)

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

    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: MatrixEvent, state: RoomState, member: RoomMember) => 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.

    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: RoomState) => void)
      • (state): void
      • Parameters

        Returns void