ReactionEvent

@objc(SBDReactionEvent)
public final class ReactionEvent : NSObject, Codable
extension ReactionEvent: Mappable

An object that represents reaction event info.

The object is returned by not only the completion handler of addReaction(message:key:completionHandler:) and deleteReaction(message:key:completionHandler:) in BaseChannel class, but also channel(_:updatedReaction:) delegate of BaseChannelDelegate protocol. The object has to be applied to the message that has the identical message ID with the apply(_:) method in BaseMessage class.

Since

3.0.169
  • message ID that indentifies the message that has the reaction event.

    Declaration

    Swift

    @objc
    public internal(set) var messageId: Int64 { get }
  • key

    The reaction key.

    Declaration

    Swift

    @objc
    public let key: String
  • The user ID that identifies the user who adds or deletes the reaction key.

    Declaration

    Swift

    @objc
    public let userId: String
  • The operation that the user did. It will be adding a reaction or deleting a reaction.

    Declaration

    Swift

    @objc
    public let operation: ReactionEventAction
  • The timestamp that represents when the reaction event occurs.

    Declaration

    Swift

    @objc
    public let updatedAt: Int64
  • Declaration

    Swift

    public required init(from decoder: Decoder) throws
  • Initialize with json dictionary

    Declaration

    Swift

    public func initWithDictionary(_ json: [String : Any]) -> `Self`?
  • Converts the object into dictionary

    Declaration

    Swift

    public func _toDictionary() -> [String : Any]