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;
    });
      • (event, member, oldMembership?): void
      • Parameters

        • event: MatrixEvent

          The matrix event which caused this event to fire.

        • member: RoomMember

          The member whose RoomMember.membership changed.

        • OptionaloldMembership: string

          The previous membership state. Null if it's a new member.

        Returns void

  • 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;
    });
      • (event, member, oldName): void
      • Parameters

        • event: MatrixEvent

          The matrix event which caused this event to fire.

        • member: RoomMember

          The member whose RoomMember.name changed.

        • oldName: string | null

          The previous name. Null if the member didn't have a name previously.

        Returns void

  • 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;
    });
      • (event, member): void
      • Parameters

        • event: MatrixEvent

          The matrix event which caused this event to fire.

        • member: RoomMember

          The member whose RoomMember.powerLevel changed.

        Returns void

  • 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;
    });
      • (event, member): void
      • Parameters

        • event: MatrixEvent

          The matrix event which caused this event to fire.

        • member: RoomMember

          The member whose RoomMember.typing changed.

        Returns void