toJson method

Map<String, dynamic> toJson()

Converts a ChatMemberUpdated to a Map for JSON encoding.

Implementation

Map<String, dynamic> toJson() {
  return {
    'chat': chat.toJson(),
    'from': from.toJson(),
    'date': date,
    'old_chat_member': oldChatMember.toJson(),
    'new_chat_member': newChatMember.toJson(),
    'invite_link': inviteLink?.toJson(),
    'via_chat_folder_invite_link': viaChatFolderInviteLink,
    'via_join_request': viaJoinRequest,
  }..removeWhere(_nullFilter);
}