From dfcd737962fa5ec3f0761abe30a3115c841e6bc3 Mon Sep 17 00:00:00 2001 From: Lukas Nagel Date: Sun, 9 Jul 2023 14:51:24 +0200 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20Added=20activity=20pub=20object?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/Models/CoreTypes/object.dart | 3 +++ lib/Models/ObjectTypes/document.dart | 4 +++- lib/Models/post.dart | 4 ++-- pubspec.yaml | 2 +- 4 files changed, 9 insertions(+), 4 deletions(-) create mode 100644 lib/Models/CoreTypes/object.dart diff --git a/lib/Models/CoreTypes/object.dart b/lib/Models/CoreTypes/object.dart new file mode 100644 index 0000000..3d3db3a --- /dev/null +++ b/lib/Models/CoreTypes/object.dart @@ -0,0 +1,3 @@ +class ActivityPubObject { + List? attachments; +} diff --git a/lib/Models/ObjectTypes/document.dart b/lib/Models/ObjectTypes/document.dart index 7312f03..1ea2cdb 100644 --- a/lib/Models/ObjectTypes/document.dart +++ b/lib/Models/ObjectTypes/document.dart @@ -1,4 +1,6 @@ -class Document { +import 'package:activitypub/Models/CoreTypes/object.dart'; + +class Document extends ActivityPubObject { final String type; final String? name; final String? mediaType; diff --git a/lib/Models/post.dart b/lib/Models/post.dart index b80e8c5..80c533d 100644 --- a/lib/Models/post.dart +++ b/lib/Models/post.dart @@ -1,9 +1,9 @@ import 'dart:core'; import 'package:activitypub/Models/ObjectTypes/document.dart'; - +import 'CoreTypes/object.dart'; import 'collection.dart'; -class Post { +class Post extends ActivityPubObject { final List to; final String? name; final String? summary; diff --git a/pubspec.yaml b/pubspec.yaml index 9788ee3..737fa57 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.3 +version: 1.2.4 repository: https://github.com/Fedodo/Fedodo.Pub.ActivityPub environment: