Type alias UserEventHandlerMap

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

Type declaration

  • User.avatarUrl: ((event, user) => void)
      • (event, user): void
      • Fires whenever any user's avatar URL changes.

        Parameters

        • event: MatrixEvent | undefined

          The matrix event which caused this event to fire.

        • user: User

          The user whose User.avatarUrl changed.

        Returns void

        Example

        matrixClient.on("User.avatarUrl", function(event, user){
        var newUrl = user.avatarUrl;
        });
  • User.currentlyActive: ((event, user) => void)
      • (event, user): void
      • Fires whenever any user's currentlyActive changes.

        Parameters

        • event: MatrixEvent | undefined

          The matrix event which caused this event to fire.

        • user: User

          The user whose User.currentlyActive changed.

        Returns void

        Example

        matrixClient.on("User.currentlyActive", function(event, user){
        var newCurrentlyActive = user.currentlyActive;
        });
  • User.displayName: ((event, user) => void)
      • (event, user): void
      • Fires whenever any user's display name changes.

        Parameters

        • event: MatrixEvent | undefined

          The matrix event which caused this event to fire.

        • user: User

          The user whose User.displayName changed.

        Returns void

        Example

        matrixClient.on("User.displayName", function(event, user){
        var newName = user.displayName;
        });
  • User.lastPresenceTs: ((event, user) => void)
      • (event, user): void
      • Fires whenever any user's lastPresenceTs changes, ie. whenever any presence event is received for a user.

        Parameters

        • event: MatrixEvent | undefined

          The matrix event which caused this event to fire.

        • user: User

          The user whose User.lastPresenceTs changed.

        Returns void

        Example

        matrixClient.on("User.lastPresenceTs", function(event, user){
        var newlastPresenceTs = user.lastPresenceTs;
        });
  • User.presence: ((event, user) => void)
      • (event, user): void
      • Fires whenever any user's presence changes.

        Parameters

        • event: MatrixEvent | undefined

          The matrix event which caused this event to fire.

        • user: User

          The user whose User.presence changed.

        Returns void

        Example

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

Generated using TypeDoc