From 698a2bae117f7c429da5f1ee30f62a1a88c72feb Mon Sep 17 00:00:00 2001 From: Thomas Sileo Date: Fri, 11 Nov 2022 15:13:45 +0100 Subject: [PATCH] Follow up fixes for the image URL support --- app/activitypub.py | 1 + app/config.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/activitypub.py b/app/activitypub.py index 84440e6..170811d 100644 --- a/app/activitypub.py +++ b/app/activitypub.py @@ -161,6 +161,7 @@ if config.CONFIG.image_url: "url": config.CONFIG.image_url, } + class NotAnObjectError(Exception): def __init__(self, url: str, resp: httpx.Response | None = None) -> None: message = f"{url} is not an AP activity" diff --git a/app/config.py b/app/config.py index 0ce10c6..14bb913 100644 --- a/app/config.py +++ b/app/config.py @@ -92,7 +92,7 @@ class Config(pydantic.BaseModel): summary: str https: bool icon_url: str - image_url: str + image_url: str | None = None secret: str debug: bool = False trusted_hosts: list[str] = ["127.0.0.1"]