User Object

This document explains the user object.
See the example of the user object.

id

typedescription
stringThe id of a user.

memberId

๐Ÿ“˜

To create a member user, you have to use memberId.

See the memberId of the boot option and boot.

typedescription
stringThe id used for identifying a member user.
If you set memberId in the boot option, the user is regarded as a member user.

name

typedescription
string | undefinedThe name of a user.
Set by updateUser.

avatarUrl

typedescription
stringThe avatar image URL of a user.

unread

typedescription
numberThe number of all unread notifications the user has not read.
It includes the number of alert. It is displayed as a red dot on the channel button.

alert

typedescription
numberThe number of important notifications that the user has not read.
It is displayed as a number on the channel button.

profile

typedescription
object | undefinedA userโ€™s profile information.
Set by updateUser or profile of boot option.

๐Ÿ“˜

onFollowUpChanged registers a callback invoked when the user changes his profile.

unsubscribeEmail

typedescription
booleanWhether to unsubscribe the marketing email.
Set by updateUser or unsubscribeEmail of boot option.

unsubscribeTexting

typedescription
booleanWhether to unsubscribe the marketing email.
Set by updateUser or unsubscribeTexting of boot option.

tags

typedescription
string[]The tags of a user.
Always lowercase.
Set by updateUser, addTags, and removeTags.

language

typedescription
stringThe language of a user.
Used for translation.
Set by updateUser and language of boot option.

Following 32 languages supported.
: 'de'(German), 'hi'(Hindi), 'no'(Norwegian), 'ru'(Russian), 'fi'(Finnish), 'pt'(Portuguese), 'hr'(Croatian), 'fr'(French), 'hu'(Hungarian), 'uk'(Ukrainian), 'sk'(Slovak), 'ca'(Catalan), 'sv'(Swedish), 'ko'(Korean), 'id'(Indonesian), 'ms'(Malay), 'el'(Greek), 'en'(English), 'it'(Italian), 'es'(Spanish), 'he'(Hebrew), 'zh'(Chinese), 'cs'(Czech), 'ar'(Arabic), 'vi'(Vietnamese),'th'(Thai), 'ja'(Japanese), 'pl'(Polish), 'ro'(Romanian), 'da'(Danish), 'nl'(Dutch), 'tr'(Turkish)

Example

{
    "id": "USER_ID",
    "memberId": "MEMBER_ID",
    "name": "USER_NAME",
    "avatarUrl": "AVATAR_URL",
    "unread": 5,
    "alert": 3,
    "profile": {
      "name": "USER_NAME",
      "email": "USER_EMAIL",
      "mobileNumber": "+821012345678",
      "CUSTOM_VALUE_1": "VALUE_1",
      "CUSTOM_VALUE_2": "VALUE_2"
    },
    "unsubscribeEmail": true,
    "unsubscribeTexting": true,
    "tags": ["tag1", "tag2"],
    "language": "ko"
}