Membership object

Membership represents a single user-channel relationship in a chat.

Properties​

The Membership interface has the following properties:

1interface Membership {
2 val chat: Chat
3 val channel: Channel
4 val user: User
5 val custom: Map<String, Any?>?
6 val updated: String?
7 val eTag: String?
8 val lastReadMessageTimetoken: Long?
9 val status: String?
10 val type: String?
11 ...
12}
ParameterDescription
chat
Type: Chat
Reference to the main Chat object.
channel
Type: Channel
Channel object.
user
Type: User
User object.
custom
Type: Map<String, Any?>
Any custom properties or metadata associated with the user-channel relationship in the form of a map of key-value pairs. App Context filtering language doesn’t support filtering by custom properties.
updated
Type: String
Last time the Membership object was changed.
eTag
Type: String
Caching value that changes whenever the Membership object changes.
lastReadMessageTimetoken
Type: Long
Timetoken of the last message a user read on a given channel.
status
Type: String?
Current status of the membership, like active or inactive.
type
Type: String?
Type of the membership, used to categorize the user-channel relationship.
API limits

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

Methods​

The Membership object exposes the following methods and properties.

Regular methods​

Event listeners​

Use case​

Membership methods enable:

Was this page useful?

Last updated on