Channel
Channel is where conversations take place between two or more chat users. It contains a list of messages and have a list of the member users that are participating in the conversation.
Parameters
The channel id in the format messaging:123.
Channel's unique ID.
Type of the channel.
Channel's name.
Channel's image.
Number of channel watchers.
Whether channel is frozen or not.
Date of the last message sent.
Date/time of creation.
Date/time of deletion.
Date/time of the last update.
Local field used to store channel's sync status and retry requests if needed.
Number of members in the channel.
The list of channel's messages.
The list of channel's members.
The list of channel's watchers.
The list of read states.
Channel's configuration.
Creator of the channel.
The number of unread messages for the current user.
Team the channel belongs to (multi-tenant only).
Whether this channel is hidden by current user or not.
Messages before this date are hidden from the user.
Cooldown period after sending each message in seconds.
The list of pinned messages in the channel.
Channel's capabilities available for the current user. Note that the field is not provided in the events.
Represents relationship of the current user to this channel.
A map of custom fields for the channel.
Constructors
Properties
Determines the last updated date/time. Returns either lastMessageAt or createdAt.
Functions
Inherited functions
Extensions
Adds member to the Channel.members and aligns Channel.memberCount.
Sets Channel.membership to member if currentUserId equals to member.user.id.
Counts messages in which user is mentioned. The method relies on the Channel.messages list and doesn't do any API call. Therefore, the count might be not reliable as it relies on the local data.
Returns a list of users that are members of the channel excluding the currently logged in user.
Increments channel's unread for the specific user.
Removes member from the Channel.members and aligns Channel.memberCount.
Sets Channel.membership to null if currentUserId equals to membership.user.id.
Updates Channel member.
Updates Member.banned property inside the Channel.members.
Sets Channel.membership to member if member.user.id equals to Channel.membership.user.id.
Sets Channel.membership.banned to banned if memberUserId equals to membership.user.id.