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
  • 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;
    });
  • 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;
    });
  • 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'
    });
  • RoomState.update: (state: RoomState) => void