SponsoredMessage.fromJson constructor

SponsoredMessage.fromJson(
  1. Map<String, dynamic> json
)

Parse from a json

Implementation

factory SponsoredMessage.fromJson(Map<String, dynamic> json) => SponsoredMessage(
  messageId: json['message_id'],
  sponsorChatId: json['sponsor_chat_id'],
  sponsorChatInfo: json['sponsor_chat_info'] == null ? null : ChatInviteLinkInfo.fromJson(json['sponsor_chat_info']),
  link: json['link'] == null ? null : InternalLinkType.fromJson(json['link']),
  content: MessageContent.fromJson(json['content']),
  extra: json['@extra'],
  clientId: json['@client_id'],
);