ChannelsViewSponsoredMessage.deserialize constructor

ChannelsViewSponsoredMessage.deserialize(
  1. BinaryReader reader
)

Deserialize.

Implementation

factory ChannelsViewSponsoredMessage.deserialize(BinaryReader reader) {
  // Read [ChannelsViewSponsoredMessage] fields.
  final channel = reader.readObject() as InputChannelBase;
  final randomId = reader.readBytes();

  // Construct [ChannelsViewSponsoredMessage] object.
  final returnValue = ChannelsViewSponsoredMessage(
    channel: channel,
    randomId: randomId,
  );

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