MessagesGetSavedDialogsByID.deserialize constructor

MessagesGetSavedDialogsByID.deserialize(
  1. BinaryReader reader
)

Deserialize.

Implementation

factory MessagesGetSavedDialogsByID.deserialize(BinaryReader reader) {
  // Read [MessagesGetSavedDialogsByID] fields.
  final flags = reader.readInt32();
  final hasParentPeerField = (flags & 2) != 0;
  final parentPeer =
      hasParentPeerField ? reader.readObject() as InputPeerBase : null;
  final ids = reader.readVectorObject<InputPeerBase>();

  // Construct [MessagesGetSavedDialogsByID] object.
  final returnValue = MessagesGetSavedDialogsByID(
    parentPeer: parentPeer,
    ids: ids.items,
  );

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