UpdateMessageReactions.deserialize constructor
UpdateMessageReactions.deserialize(
- BinaryReader reader
Deserialize.
Implementation
factory UpdateMessageReactions.deserialize(BinaryReader reader) {
// Read [UpdateMessageReactions] fields.
final flags = reader.readInt32();
final peer = reader.readObject() as PeerBase;
final msgId = reader.readInt32();
final hasTopMsgIdField = (flags & 1) != 0;
final topMsgId = hasTopMsgIdField ? reader.readInt32() : null;
final reactions = reader.readObject() as MessageReactionsBase;
// Construct [UpdateMessageReactions] object.
final returnValue = UpdateMessageReactions(
peer: peer,
msgId: msgId,
topMsgId: topMsgId,
reactions: reactions,
);
// Now return the deserialized [UpdateMessageReactions].
return returnValue;
}