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)
      • (event, member, oldMembership?): void
      • Fires whenever any room member's membership state changes.

        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

        Example

        matrixClient.on("RoomMember.membership", function(event, member, oldMembership){
        var newState = member.membership;
        });
  • RoomMember.name: ((event, member, oldName) => void)
      • (event, member, oldName): void
      • Fires whenever any room member's name changes.

        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

        Example

        matrixClient.on("RoomMember.name", function(event, member){
        var newName = member.name;
        });
  • RoomMember.powerLevel: ((event, member) => void)
      • (event, member): void
      • Fires whenever any room member's power level changes.

        Parameters

        • event: MatrixEvent

          The matrix event which caused this event to fire.

        • member: RoomMember

          The member whose RoomMember.powerLevel changed.

        Returns void

        Example

        matrixClient.on("RoomMember.powerLevel", function(event, member){
        var newPowerLevel = member.powerLevel;
        var newNormPowerLevel = member.powerLevelNorm;
        });
  • RoomMember.typing: ((event, member) => void)
      • (event, member): void
      • Fires whenever any room member's typing state changes.

        Parameters

        • event: MatrixEvent

          The matrix event which caused this event to fire.

        • member: RoomMember

          The member whose RoomMember.typing changed.

        Returns void

        Example

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

Generated using TypeDoc