Reaction
public final class Reaction<T, U> : ReactionProtocol where T : Decodable, T : Encodable, U : UserProtocol
A reaction type.
-
Reaction id.
Declaration
Swift
public let id: String
-
Activity id for the reaction.
Declaration
Swift
public let activityId: String
-
A wrapper for the user of the reaction.
Declaration
Swift
public let safeUser: MissingReference<U>
-
User of the reaction.
Declaration
Swift
public var user: U { get }
-
Type of reaction.
Declaration
Swift
public let kind: ReactionKind
-
When the reaction was created.
Declaration
Swift
public let created: Date
-
When the reaction was last updated.
Declaration
Swift
public let updated: Date?
-
An extra data for the reaction.
Declaration
Swift
public let data: T
-
Id of the parent reaction. Empty unless the reaction is a child reaction.
Declaration
Swift
public let parentId: String?
-
User own children reactions, grouped by reaction type.
Declaration
Swift
public var userOwnChildren: [ReactionKind : [Reaction<T, U>]]?
-
Children reactions, grouped by reaction type.
Declaration
Swift
public var latestChildren: [ReactionKind : [Reaction<T, U>]]
-
Child reaction count, grouped by reaction kind
Declaration
Swift
public var childrenCounts: [ReactionKind : Int]
-
Declaration
Swift
public init(from decoder: Decoder) throws
-
Skip encoding.
Declaration
Swift
public func encode(to encoder: Encoder) throws
-
Equatable.
Declaration
Swift
public static func == (lhs: Reaction<T, U>, rhs: Reaction<T, U>) -> Bool