TimelineEvent

data class TimelineEvent(val root: Event, val localId: Long, val eventId: String, val displayIndex: Int, val ownedByThreadChunk: Boolean = false, val senderInfo: SenderInfo, val annotations: EventAnnotationsSummary? = null, val readReceipts: List<ReadReceipt> = emptyList())

This data class is a wrapper around an Event. It allows to get useful data in the context of a timeline. This class is used by TimelineService Users can also enrich it with metadata.

Constructors

Link copied to clipboard
constructor(root: Event, localId: Long, eventId: String, displayIndex: Int, ownedByThreadChunk: Boolean = false, senderInfo: SenderInfo, annotations: EventAnnotationsSummary? = null, readReceipts: List<ReadReceipt> = emptyList())

Functions

Link copied to clipboard
fun enrichWith(key: String?, data: Any?)

The method to enrich this timeline event. If you provides multiple data with the same key, only first one will be kept.

Link copied to clipboard

Get the eventId which was edited by this event if any.

Link copied to clipboard

Get last MessageContent, after a possible edition.

Link copied to clipboard

Get the latest known eventId for an edited event, or the eventId for an Event which has not been edited.

Link copied to clipboard
inline fun <T> getMetadata(key: String): T?

Get the metadata associated with a key.

Link copied to clipboard

Get the relation content if any.

Link copied to clipboard

Get the latest message body, after a possible edition, stripping the reply prefix if necessary.

Link copied to clipboard

Tells if the event has been edited.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Returns true if it's a reply.

Link copied to clipboard

Returns whether or not the event is a root thread event.

Link copied to clipboard

Properties

Link copied to clipboard
Link copied to clipboard

This display index is the position in the current chunk. It's not unique on the timeline as it's reset on each chunk.

Link copied to clipboard
Link copied to clipboard

Uniquely identify an event, computed locally by the sdk.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val root: Event
Link copied to clipboard