From 5f803af67b7be3f069622fc8d71c9def398e549d Mon Sep 17 00:00:00 2001 From: Lukas Nagel Date: Tue, 1 Aug 2023 07:02:40 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=A7=20Removed=20extent?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/Models/post.dart | 29 +++++++++++++---------------- pubspec.yaml | 2 +- 2 files changed, 14 insertions(+), 17 deletions(-) diff --git a/lib/Models/post.dart b/lib/Models/post.dart index 8d24ae8..b80e8c5 100644 --- a/lib/Models/post.dart +++ b/lib/Models/post.dart @@ -1,18 +1,21 @@ import 'dart:core'; import 'package:activitypub/Models/ObjectTypes/document.dart'; -import 'CoreTypes/object.dart'; + import 'collection.dart'; -class Post extends ActivityPubObject { +class Post { final List to; final String? name; final String? summary; final bool? sensitive; final String? inReplyTo; + final String content; final String id; final String type; final DateTime published; + final String attributedTo; final Collection? replies; + final List? attachment; Post( this.to, @@ -20,18 +23,14 @@ class Post extends ActivityPubObject { this.summary, this.sensitive, this.inReplyTo, - content, + this.content, this.id, this.type, this.published, - attributedTo, + this.attributedTo, this.replies, - attachment, - ) : super( - attachment, - content, - attributedTo, - ); + this.attachment, + ); Post.fromJson(Map json) : to = convertToStringList(json["to"]), @@ -39,17 +38,15 @@ class Post extends ActivityPubObject { summary = json["summary"], sensitive = json["sensitive"], inReplyTo = json["inReplyTo"], + content = json["content"], id = json["id"], type = json["type"], published = DateTime.parse(json["published"]), + attributedTo = json["attributedTo"], + attachment = toListOfDocuments(json["attachment"]), replies = json["replies"] == null ? null - : Collection.fromJson(json["replies"]), - super( - json["attachment"], - json["content"], - json["attributedTo"], - ); + : Collection.fromJson(json["replies"]); static List convertToStringList(json) { List jsonList = []; diff --git a/pubspec.yaml b/pubspec.yaml index 87131fb..90a90fa 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.8 +version: 1.2.9 repository: https://github.com/Fedodo/Fedodo.Pub.ActivityPub environment: