Represents a GroupChannel member.

Hierarchy (view full)

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.

isBlockedByMe: boolean = false

Whether the Member is blocked by the sendbirdChat.currentUser.

isBlockingMe: boolean = false

Whether the Member is blocking the SendbirdChat.currentUser.

isMuted: boolean = false

Whether the Member is muted or not.

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
restrictionInfo: RestrictionInfo

RestrictionInfo of the current user.

role: null | Role = null

The role of this member in the channel. Refer to Role.

state: null | MemberState = null

Membership state.

userId: string

The ID of the user.

Accessors

  • get profileUrl(): string
  • Returns string

    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>

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

  • Parameters

    • metadataKey: string

    Returns Promise<object>

    Deletes a meta data.

  • Returns object

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

  • Parameters

    Returns Promise<object>

    Updates meta data.