MessagesSendPaidReaction.deserialize constructor

MessagesSendPaidReaction.deserialize(
  1. BinaryReader reader
)

Deserialize.

Implementation

factory MessagesSendPaidReaction.deserialize(BinaryReader reader) {
  // Read [MessagesSendPaidReaction] fields.
  final flags = reader.readInt32();
  final peer = reader.readObject() as InputPeerBase;
  final msgId = reader.readInt32();
  final count = reader.readInt32();
  final randomId = reader.readInt64();
  final hasPrivateField = (flags & 1) != 0;
  final private =
      hasPrivateField ? reader.readObject() as PaidReactionPrivacyBase : null;

  // Construct [MessagesSendPaidReaction] object.
  final returnValue = MessagesSendPaidReaction(
    peer: peer,
    msgId: msgId,
    count: count,
    randomId: randomId,
    private: private,
  );

  // Now return the deserialized [MessagesSendPaidReaction].
  return returnValue;
}