MessageOrigin.fromJson constructor
Parses whichever MessageOrigin subtype the JSON describes.
Implementation
factory MessageOrigin.fromJson(Map<String, dynamic> json) {
final object = tdObjectFactories[json['@type']]?.call(json);
return object is MessageOrigin ? object : UndecodedMessageOrigin(json);
}