Extended user information. Note that `isOnline` and `isNotifiable` properties are eligible for use only if the reachability function is enabled. You may check if it is enabled by reading the value of Client.reachabilityEnabled.

### Hierarchy

- ReplayEventEmitter<UserEvents>
  - User

## Index

### Events

- updated
- userSubscribed
- userUnsubscribed

### Accessors

- attributes
- friendlyName
- identity
- isSubscribed
- notifiable
- online

### Methods

- unsubscribe
- updateAttributes
- updateFriendlyName

## Events

### Readonly updated

updated: "updated" = 'updated'

Fired when the properties or the reachability status of the message have been updated.

Parameters:

1. object `data` - info object provided with the event. It has the following properties:
   - User `user` - the user in question
   - UserUpdateReason[] `updateReasons` - array of reasons for the update

### Readonly userSubscribed

userSubscribed: "userSubscribed" = 'userSubscribed'

Fired when the client has subscribed to the user.

Parameters:

1. User `user` - the user in question

### Readonly userUnsubscribed

userUnsubscribed: "userUnsubscribed" = 'userUnsubscribed'

Fired when the client has unsubscribed from the user.

Parameters:

1. User `user` - the user in question

## Accessors

### attributes

- get attributes(): any

- Custom attributes of the user.

  #### Returns any

### friendlyName

- get friendlyName(): string

- Friendly name of the user, null if not set.

  #### Returns string

### identity

- get identity(): string
- set identity(identity: string): void

- User identity.

  #### Returns string

- User identity.

  #### Parameters

  - ##### identity: string

  #### Returns void

### isSubscribed

- get isSubscribed(): boolean

- True if this user is receiving real-time status updates.

  #### Returns boolean

### notifiable

- get notifiable(): boolean

- User push notification registration status.

  #### Returns boolean

### online

- get online(): boolean

- Status of the real-time conversation connection of the user.

  #### Returns boolean

## Methods

### unsubscribe

- unsubscribe(): Promise<void>

- Remove the user from the subscription list.

  #### Returns Promise<void>

  A promise of completion.

### updateAttributes

- updateAttributes(attributes: any): Promise<User>

- Edit user attributes.

  #### Parameters

  - ##### attributes: any

    New attributes.

  #### Returns Promise<User>

### updateFriendlyName

- updateFriendlyName(friendlyName: any): Promise<User>

- Update the friendly name of the user.

  #### Parameters

  - ##### friendlyName: any

    New friendly name.

  #### Returns Promise<User>