On this page

Membership object

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

Properties​

The MembershipImpl class implements the Membership protocol and takes the following properties:

1extension MembershipImpl: Membership {
2 public var chat: ChatImpl
3 public var channel: ChannelImpl
4 public var user: UserImpl
5 public var custom: [String: JSONCodableScalar]?
6 public var status: String?
7 public var type: String?
8 public var eTag: String?
9 public var updated: String?
10 public var lastReadMessageTimetoken: Timetoken?
11
12 ...
13}
ParameterDescription
chat
Type: ChatImpl
Reference to the main Chat protocol.
channel
Type: ChannelImpl
ChannelImpl object.
user
Type: UserImpl
UserImpl object.
custom
Type: [String: JSONCodableScalar]
Any custom properties or metadata associated with the user-channel relationship in the form of a dictionary of key-value pairs. App Context filtering language doesn’t support filtering by custom properties.
status
Type: String
Status of the membership.
type
Type: String
Type of the membership.
eTag
Type: String
Caching value that changes whenever the MembershipImpl object changes.
updated
Type: String
Last time the MembershipImpl object was changed.
lastReadMessageTimetoken
Type: Timetoken
Timetoken of the last message a user read on a given channel.
API limits

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

Methods​

You can call the following methods and properties on the Membership object.

Click on each method or property for more details.

Event listeners​

You can call the following event listener methods on the Membership object.

Click on each method for more details.

Use case​

Membership methods enable: