Reaction

@Immutable
data class Reaction(    val messageId: String = "",     val type: String = "",     val score: Int = 0,     val user: User? = null,     val userId: String = "",     val createdAt: Date? = null,     val createdLocallyAt: Date? = null,     val updatedAt: Date? = null,     val deletedAt: Date? = null,     val syncStatus: SyncStatus = SyncStatus.COMPLETED,     val extraData: Map<String, Any> = mapOf(),     val enforceUnique: Boolean = false) : CustomObject

Model representing a message reaction.

Parameters

messageId

The id of the message.

type

The type of the reaction.

score

The score(count) of the reaction, used if you want to allow users to clap/like etc multiple times.

user

The user who sent the reaction.

userId

The id of the user who sent the reaction.

createdAt

The date when the reaction was created.

createdLocallyAt

The date when the reaction was created locally.

updatedAt

The date when the reaction was updated.

deletedAt

The date when the reaction was deleted.

syncStatus

The synchronization status of the reaction.

enforceUnique

If true, only one reaction of this type is allowed per user.

Constructors

Link copied to clipboard
constructor(    messageId: String = "",     type: String = "",     score: Int = 0,     user: User? = null,     userId: String = "",     createdAt: Date? = null,     createdLocallyAt: Date? = null,     updatedAt: Date? = null,     deletedAt: Date? = null,     syncStatus: SyncStatus = SyncStatus.COMPLETED,     extraData: Map<String, Any> = mapOf(),     enforceUnique: Boolean = false)

Types

Link copied to clipboard
class Builder

Properties

Link copied to clipboard
val createdAt: Date? = null
Link copied to clipboard
val createdLocallyAt: Date? = null
Link copied to clipboard
val deletedAt: Date? = null
Link copied to clipboard
val enforceUnique: Boolean = false
Link copied to clipboard
open override val extraData: Map<String, Any>

The custom key-value data associated with this object.

Link copied to clipboard
val id: String

The unique identifier of the reaction.

Link copied to clipboard
Link copied to clipboard
val score: Int = 0
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val updatedAt: Date? = null
Link copied to clipboard
val user: User? = null
Link copied to clipboard

Functions

Link copied to clipboard
Link copied to clipboard

Inherited functions

Link copied to clipboard
open fun <T> getExtraValue(key: String, default: T): T

Returns the value associated with the given key, or default if the key is not present in the extraData.