Type Alias UserEventHandlerMap

UserEventHandlerMap: {
    "User.avatarUrl": (event: MatrixEvent | undefined, user: User) => void;
    "User.currentlyActive": (
        event: MatrixEvent | undefined,
        user: User,
    ) => void;
    "User.displayName": (event: MatrixEvent | undefined, user: User) => void;
    "User.lastPresenceTs": (event: MatrixEvent | undefined, user: User) => void;
    "User.presence": (event: MatrixEvent | undefined, user: User) => void;
}

Type declaration

  • User.avatarUrl: (event: MatrixEvent | undefined, user: User) => void

    Fires whenever any user's avatar URL changes.

    matrixClient.on("User.avatarUrl", function(event, user){
    var newUrl = user.avatarUrl;
    });
  • User.currentlyActive: (event: MatrixEvent | undefined, user: User) => void

    Fires whenever any user's currentlyActive changes.

    matrixClient.on("User.currentlyActive", function(event, user){
    var newCurrentlyActive = user.currentlyActive;
    });
  • User.displayName: (event: MatrixEvent | undefined, user: User) => void

    Fires whenever any user's display name changes.

    matrixClient.on("User.displayName", function(event, user){
    var newName = user.displayName;
    });
  • User.lastPresenceTs: (event: MatrixEvent | undefined, user: User) => void

    Fires whenever any user's lastPresenceTs changes, ie. whenever any presence event is received for a user.

    matrixClient.on("User.lastPresenceTs", function(event, user){
    var newlastPresenceTs = user.lastPresenceTs;
    });
  • User.presence: (event: MatrixEvent | undefined, user: User) => void

    Fires whenever any user's presence changes.

    matrixClient.on("User.presence", function(event, user){
    var newPresence = user.presence;
    });