Package io.getstream.chat.android.models
Class Channel
-
- All Implemented Interfaces:
-
io.getstream.chat.android.models.CustomObject,io.getstream.chat.android.models.querysort.ComparableFieldProvider
@Immutable() public final class Channel implements CustomObject, ComparableFieldProvider
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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classChannel.Builder
-
Field Summary
-
Constructor Summary
Constructors Constructor Description Channel(String id, String type, String name, String image, Integer watcherCount, Boolean frozen, Date createdAt, Date deletedAt, Date updatedAt, SyncStatus syncStatus, Integer memberCount, List<Message> messages, List<Member> members, List<User> watchers, List<ChannelUserRead> read, Config config, User createdBy, Integer unreadCount, String team, Boolean hidden, Date hiddenMessagesBefore, Integer cooldown, List<PendingMessage> pendingMessages, List<Message> pinnedMessages, Set<String> ownCapabilities, Member membership, List<Message> cachedLatestMessages, Boolean isInsideSearch, DraftMessage draftMessage, List<Location> activeLiveLocations, Integer messageCount, PushPreference pushPreference, List<String> filterTags, Date lastMessageAt, Date truncatedAt, Boolean disabled, Boolean blocked, Map<String, Object> extraData)
-
Method Summary
-
-
Constructor Detail
-
Channel
Channel(String id, String type, String name, String image, Integer watcherCount, Boolean frozen, Date createdAt, Date deletedAt, Date updatedAt, SyncStatus syncStatus, Integer memberCount, List<Message> messages, List<Member> members, List<User> watchers, List<ChannelUserRead> read, Config config, User createdBy, Integer unreadCount, String team, Boolean hidden, Date hiddenMessagesBefore, Integer cooldown, List<PendingMessage> pendingMessages, List<Message> pinnedMessages, Set<String> ownCapabilities, Member membership, List<Message> cachedLatestMessages, Boolean isInsideSearch, DraftMessage draftMessage, List<Location> activeLiveLocations, Integer messageCount, PushPreference pushPreference, List<String> filterTags, Date lastMessageAt, Date truncatedAt, Boolean disabled, Boolean blocked, Map<String, Object> extraData)
- Parameters:
id- Channel's unique ID.type- Type of the channel.name- Channel's name.image- Channel's image.watcherCount- Number of channel watchers.frozen- Whether channel is frozen or not.createdAt- Date/time of creation.deletedAt- Date/time of deletion.updatedAt- Date/time of the last update.syncStatus- Local field used to store channel's sync status and retry requests if needed.memberCount- Number of members in the channel.messages- The list of channel's messages.members- The list of channel's members.watchers- The list of channel's watchers.read- The list of read states.config- Channel's configuration.createdBy- Creator of the channel.unreadCount- The number of unread messages for the current user.team- Team the channel belongs to (multi-tenant only).hidden- Whether this channel is hidden by current user or not.hiddenMessagesBefore- Messages before this date are hidden from the user.cooldown- Cooldown period after sending each message in seconds.pendingMessages- The list of pending messages in the channel for the current user (if the feature enabled).pinnedMessages- The list of pinned messages in the channel.ownCapabilities- Channel's capabilities available for the current user.membership- Represents relationship of the current user to this channel.cachedLatestMessages- The list of cached newest messages if the regular list does not contain the newest messages.isInsideSearch- When the channel is inside search, eg.draftMessage- The draft message for the channel.activeLiveLocations- The list of active live locations in the channel.messageCount- The total number of messages in the channel.pushPreference- Channel-specific push preferences (if set).filterTags- The list of filter tags applied to the channel.lastMessageAt- Date/time of the last message sent.truncatedAt- Date/time of the last truncation, if the channel was ever truncated.disabled- Whether the channel is disabled or not.blocked- Whether the channel is blocked or not.extraData- A map of custom fields for the channel.
-
-
Method Detail
-
getWatcherCount
final Integer getWatcherCount()
-
getCreatedAt
final Date getCreatedAt()
-
getDeletedAt
final Date getDeletedAt()
-
getUpdatedAt
final Date getUpdatedAt()
-
getSyncStatus
final SyncStatus getSyncStatus()
-
getMemberCount
final Integer getMemberCount()
-
getMessages
final List<Message> getMessages()
-
getMembers
final List<Member> getMembers()
-
getWatchers
final List<User> getWatchers()
-
getRead
final List<ChannelUserRead> getRead()
-
getCreatedBy
final User getCreatedBy()
-
getUnreadCount
final Integer getUnreadCount()
-
getHiddenMessagesBefore
final Date getHiddenMessagesBefore()
-
getCooldown
final Integer getCooldown()
-
getPendingMessages
final List<PendingMessage> getPendingMessages()
-
getPinnedMessages
final List<Message> getPinnedMessages()
-
getOwnCapabilities
final Set<String> getOwnCapabilities()
-
getMembership
final Member getMembership()
-
getCachedLatestMessages
final List<Message> getCachedLatestMessages()
-
isInsideSearch
final Boolean isInsideSearch()
-
getDraftMessage
final DraftMessage getDraftMessage()
-
getActiveLiveLocations
final List<Location> getActiveLiveLocations()
-
getMessageCount
final Integer getMessageCount()
-
getPushPreference
final PushPreference getPushPreference()
-
getFilterTags
final List<String> getFilterTags()
-
getLastMessageAt
final Date getLastMessageAt()
-
getTruncatedAt
final Date getTruncatedAt()
-
getDisabled
final Boolean getDisabled()
-
getBlocked
final Boolean getBlocked()
-
getExtraData
Map<String, Object> getExtraData()
-
getLastUpdated
final Date getLastUpdated()
Determines the last updated date/time. Returns either lastMessageAt or createdAt.
-
getHasUnread
final Boolean getHasUnread()
Whether a channel contains unread messages or not.
-
getComparableField
Comparable<?> getComparableField(String fieldName)
Gets a comparable fields from a name.
-
newBuilder
@SinceKotlin(version = "99999.9") final Channel.Builder newBuilder()
-
-
-
-