Move handlers to activitypub classes

This commit is contained in:
Mouse Reeve
2021-02-15 18:47:08 -08:00
parent e810c2bee0
commit 81e2021f92
5 changed files with 78 additions and 31 deletions

View File

@ -21,6 +21,11 @@ class Create(Verb):
signature: Signature = None
type: str = 'Create'
def action(self):
''' create the model instance from the dataclass '''
# check for dupes
self.object.to_model()
@dataclass(init=False)
class Delete(Verb):
@ -46,11 +51,13 @@ class Undo(Verb):
@dataclass(init=False)
class Follow(Verb):
''' Follow activity '''
object: str
type: str = 'Follow'
@dataclass(init=False)
class Block(Verb):
''' Block activity '''
object: str
type: str = 'Block'
@dataclass(init=False)