Type Alias RoomMemberEventHandlerMap

RoomMemberEventHandlerMap: {
    "RoomMember.membership": (
        event: MatrixEvent,
        member: RoomMember,
        oldMembership?: string,
    ) => void;
    "RoomMember.name": (
        event: MatrixEvent,
        member: RoomMember,
        oldName: string | null,
    ) => void;
    "RoomMember.powerLevel": (event: MatrixEvent, member: RoomMember) => void;
    "RoomMember.typing": (event: MatrixEvent, member: RoomMember) => void;
}

Type declaration

  • RoomMember.membership: (event: MatrixEvent, member: RoomMember, oldMembership?: string) => void

    Fires whenever any room member's membership state changes.

    matrixClient.on("RoomMember.membership", function(event, member, oldMembership){
    var newState = member.membership;
    });
  • RoomMember.name: (event: MatrixEvent, member: RoomMember, oldName: string | null) => void

    Fires whenever any room member's name changes.

    matrixClient.on("RoomMember.name", function(event, member){
    var newName = member.name;
    });
  • RoomMember.powerLevel: (event: MatrixEvent, member: RoomMember) => void

    Fires whenever any room member's power level changes.

    matrixClient.on("RoomMember.powerLevel", function(event, member){
    var newPowerLevel = member.powerLevel;
    var newNormPowerLevel = member.powerLevelNorm;
    });
  • RoomMember.typing: (event: MatrixEvent, member: RoomMember) => void

    Fires whenever any room member's typing state changes.

    matrixClient.on("RoomMember.typing", function(event, member){
    var isTyping = member.typing;
    });