Properties:
Name | Type | Description |
---|---|---|
identity |
String | User identity |
friendlyName |
String | User friendly name, null if not set |
attributes |
any | Object with custom attributes for user |
isOnline |
Boolean | User real-time conversation connection status |
isNotifiable |
Boolean | User push notification registration status |
isSubscribed |
Boolean | Check if this user receives real-time status updates |
Fires:
Methods
-
unsubscribe()
-
Removes User from subscription list.
Returns:
Promise of completion- Type
- Promise.<void>
-
updateAttributes(attributes)
-
Updates user attributes.
Parameters:
Name Type Description attributes
any new attributes for User. Returns:
- Type
- Promise.<User>
-
updateFriendlyName(friendlyName)
-
Update Users friendlyName.
Parameters:
Name Type Description friendlyName
String | null Updated friendlyName Returns:
- Type
- Promise.<User>
Type Definitions
-
UpdateReason
-
The update reason for
updated
event emitted on UserType:
- 'friendlyName' | 'attributes' | 'reachabilityOnline' | 'reachabilityNotifiable'
Events
-
updated
-
Fired when User's properties or reachability status have been updated.
Type: Object
Properties:
Name Type Description user
User Updated User updateReasons
Array.<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