Membership object

Membership is an object that refers to a single user-channel relationship in a chat.

Properties

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

extension MembershipImpl: Membership {
public var chat: ChatImpl
public var channel: ChannelImpl
public var user: UserImpl
public var custom: [String: JSONCodableScalar]?
public var eTag: String?
public var updated: String?
public var lastReadMessageTimetoken: Timetoken?

...
}
ParameterTypeDescription
chatChatImplReference to the main Chat protocol.
channelChannelImplChannelImpl object.
userUserImplUserImpl object.
custom[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.
eTagStringCaching value that changes whenever the MembershipImpl object changes.
updatedStringLast time the MembershipImpl object was changed.
lastReadMessageTimetokenTimetokenTimetoken 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.

Use case

For example, you can use the Membership-related methods to:

Last updated on