User object

User represents a single user in a chat.

Properties​

The User interface has the following properties:

1interface User {
2 val chat: Chat
3 val id: String
4 val name: String?
5 val externalId: String?
6 val profileUrl: String?
7 val email: String?
8 val custom: Map<String, Any?>?
9 val status: String?
10 val type: String?
11 val updated: String?
12 val lastActiveTimestamp: Long?
13 val active: Boolean
14}
chat#
Type: Chat
Reference to the main Chat object.
id#
Type: String
Unique ID of the user.
name#
Type: String
Display name or username of the user (must not be empty or consist only of whitespace characters).
externalId#
Type: String
Identifier for the user from an external system, such as a third-party authentication provider or a user directory.
profileUrl#
Type: String
URL to the user's profile or avatar image.
email#
Type: String
User's email address.
custom#
Type: Map<String, Any?>
Any custom properties or metadata associated with the user in the form of a JSON. App Context filtering language doesn’t support filtering by custom properties.
status#
Type: String
Current status of the user, like online, offline, or away.
type#
Type: String
Type of the user, like admin, member, guest.
updated#
Type: String
Timestamp (a number of milliseconds since January 1, 1970) for the last time the user information was updated or modified.
lastActiveTimestamp#
Type: Long
Timestamp for the last time the user was active in a chat app.
active#
Type: Boolean
Whether the user is currently active in the app. Based on lastActiveTimestamp and the configured storeUserActivityInterval.
API limits

To learn about the maximum length of parameters used to set user metadata, refer to REST API docs.

Methods​

The User object exposes the following methods.

Regular methods​

Event listeners​

Use case​

User methods enable:

Was this page useful?

Last updated on