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)
      • (event, state, lastStateEvent): void
      • Fires whenever the event dictionary in room state is updated.

        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

        Example

        matrixClient.on("RoomState.events", function(event, state, prevEvent){
        var newStateEvent = event;
        });
  • RoomState.members: ((event, state, member) => void)
      • (event, state, member): void
      • Fires whenever a member in the members dictionary is updated in any way.

        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

        Example

        matrixClient.on("RoomState.members", function(event, state, member){
        var newMembershipState = member.membership;
        });
  • RoomState.newMember: ((event, state, member) => void)
      • (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.

        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

        Example

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

        Returns void

Generated using TypeDoc