Properties:
| Name | Type | Description |
|---|---|---|
identity |
String | User identity |
friendlyName |
String | User friendly name, null if not set |
attributes |
Object | Object with custom attributes for user |
online |
Boolean | User real-time channel connection status |
notifiable |
Boolean | User push notification registration status |
Fires:
Methods
-
unsubscribe()
-
Removes User from subscription list.
Returns:
Promise of completion- Type
- Promise.<void>
-
updateAttributes(attributes)
-
Updates user attributes.
Parameters:
Name Type Description attributesObject Updated attributes Returns:
- Type
- Promise.<(User|Error|SessionError)>
-
updateFriendlyName(friendlyName)
-
Update Users friendlyName.
Parameters:
Name Type Description friendlyNameString Updated friendlyName Returns:
- Type
- Promise.<(User|Error|SessionError)>
Type Definitions
-
UpdateReason
-
The update reason for
updatedevent emitted on UserType:
- 'friendlyName' | 'attributes' | 'online' | 'notifiable'
Events
-
updated
-
Fired when User's properties or reachability status have been updated.
Type: Object
Properties:
Name Type Description userUser Updated User updateReasonsArray.<User#UpdateReason> Array of User's updated event reasons -
userSubscribed
-
Fired when Client is subscribed to User.
Type: User
-
userUnsubscribed
-
Fired when Client is unsubscribed from this User.
Type: User