From d689b6e7c44fe0eb3733d4071a5b619503077b6f Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Wed, 14 Oct 2020 08:38:51 -0700 Subject: [PATCH] Adds Delete verb --- bookwyrm/activitypub/__init__.py | 2 +- bookwyrm/activitypub/verbs.py | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/bookwyrm/activitypub/__init__.py b/bookwyrm/activitypub/__init__.py index 45cd42a5c..446455fa3 100644 --- a/bookwyrm/activitypub/__init__.py +++ b/bookwyrm/activitypub/__init__.py @@ -9,7 +9,7 @@ from .interaction import Boost, Like from .ordered_collection import OrderedCollection, OrderedCollectionPage from .person import Person from .book import Edition, Work, Author -from .verbs import Create, Undo, Update +from .verbs import Create, Delete, Undo, Update from .verbs import Follow, Accept, Reject from .verbs import Add, Remove diff --git a/bookwyrm/activitypub/verbs.py b/bookwyrm/activitypub/verbs.py index 1ae106b0f..bd6d882d3 100644 --- a/bookwyrm/activitypub/verbs.py +++ b/bookwyrm/activitypub/verbs.py @@ -21,6 +21,15 @@ class Create(Verb): type: str = 'Create' +@dataclass(init=False) +class Delete(Verb): + ''' Create activity ''' + to: List + cc: List + signature: Signature + type: str = 'Delete' + + @dataclass(init=False) class Update(Verb): ''' Update activity '''