Type alias RoomMemberEventHandlerMap

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

Type declaration

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

    Fires whenever any room member's membership state changes.

    Example

    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.

        • Optional oldMembership: string

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

        Returns void

  • RoomMember.name: ((event, member, oldName) => void)

    Fires whenever any room member's name changes.

    Example

    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, member) => void)

    Fires whenever any room member's power level changes.

    Example

    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, member) => void)

    Fires whenever any room member's typing state changes.

    Example

    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

Generated using TypeDoc