fromJson static method
Inherited by: NotificationTypeNewCall NotificationTypeNewMessage NotificationTypeNewPushMessage NotificationTypeNewSecretChat
Implementation
static NotificationTypeNewPushMessage? fromJson(Map<String, dynamic>? json) {
if (json == null) {
return null;
}
return NotificationTypeNewPushMessage(
messageId: (json['message_id'] as int?) ?? 0,
senderId: MessageSender.fromJson(tdMapFromJson(json['sender_id'])),
senderName: (json['sender_name'] as String?) ?? '',
isOutgoing: (json['is_outgoing'] as bool?) ?? false,
content: PushMessageContent.fromJson(tdMapFromJson(json['content'])),
);
}