diff --git a/lib/Models/actor.dart b/lib/Models/actor.dart index 58a24df..60496c9 100644 --- a/lib/Models/actor.dart +++ b/lib/Models/actor.dart @@ -49,7 +49,7 @@ class Actor { icon = getMedia(json["icon"]), publicKey = PublicKey.fromJson(json["publicKey"]), endpoints = Endpoints.fromJson(json["endpoints"]), - published = DateTime.tryParse(json["published"]); + published = json["published"] != null ? DateTime.tryParse(json["published"]) : null; static Media? getMedia(dynamic json) { if (json != null) { diff --git a/pubspec.yaml b/pubspec.yaml index 21eff9d..f886a94 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: activitypub description: A library for the ActivityPub standard. Created an also used by Fedodo. -version: 1.2.0 +version: 1.2.1 repository: https://github.com/Fedodo/Fedodo.Pub.ActivityPub environment: