Package io.getstream.chat.android.models
Class Reaction
-
- All Implemented Interfaces:
-
io.getstream.chat.android.models.CustomObject,io.getstream.chat.android.models.querysort.ComparableFieldProvider
@Immutable() public final class Reaction implements CustomObject, ComparableFieldProvider
Model representing a message reaction.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classReaction.Builder
-
Field Summary
Fields Modifier and Type Field Description private final StringmessageIdprivate final Stringtypeprivate final Integerscoreprivate final Useruserprivate final StringuserIdprivate final DatecreatedAtprivate final DatecreatedLocallyAtprivate final DateupdatedAtprivate final DatedeletedAtprivate final SyncStatussyncStatusprivate final Map<String, Object>extraDataprivate final BooleanenforceUniqueprivate final BooleanskipPushprivate final StringemojiCodeprivate final Stringid
-
Constructor Summary
Constructors Constructor Description Reaction(String messageId, String type, Integer score, User user, String userId, Date createdAt, Date createdLocallyAt, Date updatedAt, Date deletedAt, SyncStatus syncStatus, Map<String, Object> extraData, Boolean enforceUnique, Boolean skipPush, String emojiCode)
-
Method Summary
Modifier and Type Method Description final StringgetMessageId()final StringgetType()final IntegergetScore()final UsergetUser()final StringgetUserId()final DategetCreatedAt()final DategetCreatedLocallyAt()final DategetUpdatedAt()final DategetDeletedAt()final SyncStatusgetSyncStatus()Map<String, Object>getExtraData()The custom key-value data associated with this object. final BooleangetEnforceUnique()final BooleangetSkipPush()final StringgetEmojiCode()final StringgetId()The unique identifier of the reaction. final StringfetchUserId()Comparable<?>getComparableField(String fieldName)Gets a comparable fields from a name. final Reaction.BuildernewBuilder()-
-
Constructor Detail
-
Reaction
Reaction(String messageId, String type, Integer score, User user, String userId, Date createdAt, Date createdLocallyAt, Date updatedAt, Date deletedAt, SyncStatus syncStatus, Map<String, Object> extraData, Boolean enforceUnique, Boolean skipPush, String emojiCode)
- 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.skipPush- If true, sending a push notification will be skipped for this reaction.emojiCode- Optional emoji to be shown in the push notification delivered for the reaction (instead of :type:).
-
-
Method Detail
-
getMessageId
final String getMessageId()
-
getCreatedAt
final Date getCreatedAt()
-
getCreatedLocallyAt
final Date getCreatedLocallyAt()
-
getUpdatedAt
final Date getUpdatedAt()
-
getDeletedAt
final Date getDeletedAt()
-
getSyncStatus
final SyncStatus getSyncStatus()
-
getExtraData
Map<String, Object> getExtraData()
The custom key-value data associated with this object.
-
getEnforceUnique
final Boolean getEnforceUnique()
-
getSkipPush
final Boolean getSkipPush()
-
getEmojiCode
final String getEmojiCode()
-
fetchUserId
final String fetchUserId()
-
getComparableField
Comparable<?> getComparableField(String fieldName)
Gets a comparable fields from a name.
-
newBuilder
@SinceKotlin(version = "99999.9") final Reaction.Builder newBuilder()
-
-
-
-