Options
All
  • Public
  • Public/Protected
  • All
Menu

A participant represents a remote client in a conversation.

Hierarchy

  • ReplayEventEmitter<ParticipantEvents>
    • Participant

Index

Events

Static Readonly typingEnded

typingEnded: "typingEnded" = 'typingEnded'

Fired when the participant has stopped typing.

Parameters:

  1. Participant participant - the participant in question

Static Readonly typingStarted

typingStarted: "typingStarted" = 'typingStarted'

Fired when the participant has started typing.

Parameters:

  1. Participant participant - the participant in question

Static Readonly updated

updated: "updated" = 'updated'

Fired when the fields of the participant have been updated.

Parameters:

  1. object data - info object provided with the event. It has the following properties:

Properties

Readonly conversation

conversation: Conversation

Conversation that the remote client is a participant of.

Accessors

attributes

  • get attributes(): Object
  • Custom attributes of the participant.

    Returns Object

dateCreated

  • get dateCreated(): Date
  • Date this participant was created on.

    Returns Date

dateUpdated

  • get dateUpdated(): Date
  • Date this participant was last updated on.

    Returns Date

identity

  • get identity(): string
  • Identity of the participant.

    Returns string

isTyping

  • get isTyping(): boolean
  • Indicates whether the participant is currently typing.

    Returns boolean

lastReadMessageIndex

  • get lastReadMessageIndex(): number
  • The index of the last read message by the participant. 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

lastReadTimestamp

  • get lastReadTimestamp(): Date
  • Date of the most recent read horizon update.

    Returns Date

sid

  • get sid(): string
  • The server-assigned unique identifier for the participant.

    Returns string

type

Methods

getUser

  • getUser(): Promise<User>
  • Get the user for this participant and subscribes to it. Supported only for participants of type chat.

    Returns Promise<User>

remove

  • remove(): Promise<void>
  • Remove the participant from the conversation.

    Returns Promise<void>

updateAttributes

  • updateAttributes(attributes: any): Promise<Participant>
  • Update the attributes of the participant.

    Parameters

    • attributes: any

      New attributes.

    Returns Promise<Participant>