Thread

@Immutable
data class Thread(val activeParticipantCount: Int, val cid: String, val channel: Channel?, val parentMessageId: String, val parentMessage: Message, val createdByUserId: String, val createdBy: User?, val participantCount: Int, val threadParticipants: List<ThreadParticipant>, val lastMessageAt: Date, val createdAt: Date, val updatedAt: Date, val deletedAt: Date?, val title: String, val latestReplies: List<Message>, val read: List<ChannelUserRead>)

Domain model for a thread. Holds all information related to a thread.

Parameters

activeParticipantCount

The number of active participants in the thread.

cid

Id of the channel in which the thread resides.

channel

The Channel object holding info about the channel if which the thread resides.

parentMessageId

The ID of the parent message of the thread.

parentMessage

The parent message of the thread. (Note: This object is not always delivered, sometimes we only receive the ID of the parent message - parentMessageId).

createdByUserId

The ID of the User which created the thread.

createdBy

The User which created the thread. (Note: This object is not always delivered, sometimes we only receive the ID of the user - createdByUserId).

participantCount

The number of participants in the thread.

threadParticipants

The list of participants in the thread.

lastMessageAt

Date of the last message in the thread.

createdAt

Date when the thread was created.

updatedAt

Date of the most recent update of the thread.

deletedAt

Date when the thread was deleted (null if the thread is not deleted).

title

The title of the thread.

latestReplies

The list of latest replies in the thread.

read

Information about the read status for the participants in the thread.

Constructors

Link copied to clipboard
constructor(activeParticipantCount: Int, cid: String, channel: Channel?, parentMessageId: String, parentMessage: Message, createdByUserId: String, createdBy: User?, participantCount: Int, threadParticipants: List<ThreadParticipant>, lastMessageAt: Date, createdAt: Date, updatedAt: Date, deletedAt: Date?, title: String, latestReplies: List<Message>, read: List<ChannelUserRead>)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val cid: String
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

The number of replies in the thread (replies to the parent message).

Link copied to clipboard
Link copied to clipboard