A member represents a remote client in a channel.

### Hierarchy

- ReplayEventEmitter<MemberEvents>
  - Member

## Index

### Events

- typingEnded
- typingStarted
- updated

### Properties

- channel

### Accessors

- attributes
- dateCreated
- dateUpdated
- identity
- isTyping
- lastConsumedMessageIndex
- lastConsumptionTimestamp
- sid
- type

### Methods

- getUser
- getUserDescriptor
- remove
- updateAttributes

## Events

### Static Readonly typingEnded

typingEnded: "typingEnded" = 'typingEnded'

Fired when the member has stopped typing.

Parameters:

1. Member `member` - the member in question

### Static Readonly typingStarted

typingStarted: "typingStarted" = 'typingStarted'

Fired when the member has started typing.

Parameters:

1. Member `member` - the member in question

### Static Readonly updated

updated: "updated" = 'updated'

Fired when the fields of the member have been updated.

Parameters:

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

## Properties

### Readonly channel

channel: Channel

Channel that the remote client is a member of.

## Accessors

### attributes

- get attributes(): Object

- Custom attributes of the member.

  #### Returns Object

### dateCreated

- get dateCreated(): Date

- Date this member was created on.

  #### Returns Date

### dateUpdated

- get dateUpdated(): Date

- Date this member was last updated on.

  #### Returns Date

### identity

- get identity(): string

- Identity of the member.

  #### Returns string

### isTyping

- get isTyping(): boolean

- Indicates whether the member is currently typing.

  #### Returns boolean

### lastConsumedMessageIndex

- get lastConsumedMessageIndex(): number

- The index of the last consumed message by the member. Note that retrieving messages on a client endpoint does not mean that messages are read, please consider reading about the Read Horizon feature to find out about the proper way to mark messages as read.

  #### Returns number

### lastConsumptionTimestamp

- get lastConsumptionTimestamp(): Date

- Date of the most recent consumption horizon update.

  #### Returns Date

### sid

- get sid(): string

- The server-assigned unique identifier for the member.

  #### Returns string

### type

- get type(): MemberType

- Message type of the member.

  #### Returns MemberType

## Methods

### getUser

- getUser(): Promise<User>

- Get the user for this member and subscribes to it. Supported only for members of type `chat`.

  #### Returns Promise<User>

### getUserDescriptor

- getUserDescriptor(): Promise<UserDescriptor>

- Get the user descriptor for this member. Supported only for members of type `chat`.

  #### Returns Promise<UserDescriptor>

### remove

- remove(): Promise<void>

- Remove the member from the channel.

  #### Returns Promise<void>

### updateAttributes

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

- Update the attributes of the member.

  #### Parameters

  - ##### attributes: any

    New attributes.

  #### Returns Promise<Member>