Description

Represents a user.

Hierarchy

Properties

connectionStatus: UserOnlineState

User connection status.

friendDiscoveryKey: null | string

Represents friend discovery key.

friendName: null | string

The friend name.

isActive: boolean

Whether the user is active.

lastSeenAt: null | number

The time this User has been last seen at. Zero if this User is online.

metaData: object

All meta data of the user.

nickname: string

The nickname of the user.

plainProfileUrl: string

The plain profile image URL, which does not contain sendbirdChat.eKey as a parameter. If the file encryption feature is enabled, accessing this plainProfileUrl will be denied.

preferredLanguages: null | string[]

The preferred languages of the user.

requireAuth: boolean
userId: string

The ID of the user.

Accessors

  • get profileUrl(): string
  • Returns string

    Description

    The profile image URL. If the file encryption feature is enabled, this will have sendbirdChat.eKey combined with the plainProfileUrl so the file can be accessed. For caching the file, it is recommended to use plainProfileUrl as the key of the file cache.

Methods

  • Parameters

    Returns Promise<object>

    Description

    Creates meta data. This can be used to customize the user.

  • Returns Promise<void>

    Description

    Deletes all meta data.

  • Parameters

    • metadataKey: string

    Returns Promise<object>

    Description

    Deletes a meta data.

  • Returns object

    Description

    Serializes the User instance. The instance can be restored by sendbirdChat.buildUserFromSerializedData().

  • Parameters

    • input: MetaData
    • upsert: boolean = false

    Returns Promise<object>

    Description

    Updates meta data.

Generated using TypeDoc