diff --git a/bookwyrm/activitypub/__init__.py b/bookwyrm/activitypub/__init__.py index 716584554..d363fbd53 100644 --- a/bookwyrm/activitypub/__init__.py +++ b/bookwyrm/activitypub/__init__.py @@ -5,7 +5,7 @@ import sys from .base_activity import ActivityEncoder, Signature, naive_parse from .base_activity import Link, Mention from .base_activity import ActivitySerializerError, resolve_remote_id -from .image import Document +from .image import Document, Image from .note import Note, GeneratedNote, Article, Comment, Quotation from .note import Review, Rating from .note import Tombstone diff --git a/bookwyrm/activitypub/image.py b/bookwyrm/activitypub/image.py index 425984224..863388a78 100644 --- a/bookwyrm/activitypub/image.py +++ b/bookwyrm/activitypub/image.py @@ -5,9 +5,14 @@ from .base_activity import ActivityObject @dataclass(init=False) class Document(ActivityObject): - """ image block """ + """ a document """ url: str name: str = "" type: str = "Document" id: str = None + +@dataclass(init=False) +class Image(Document): + """ an image """ + type: str = "Image" diff --git a/bookwyrm/activitypub/person.py b/bookwyrm/activitypub/person.py index 550fc7bde..9231bd955 100644 --- a/bookwyrm/activitypub/person.py +++ b/bookwyrm/activitypub/person.py @@ -3,7 +3,7 @@ from dataclasses import dataclass, field from typing import Dict from .base_activity import ActivityObject -from .image import Document +from .image import Image @dataclass(init=False) @@ -28,7 +28,7 @@ class Person(ActivityObject): endpoints: Dict = None name: str = None summary: str = None - icon: Document = field(default_factory=lambda: {}) + icon: Image = field(default_factory=lambda: {}) bookwyrmUser: bool = False manuallyApprovesFollowers: str = False discoverable: str = False