From 555046ac4dccf4e5f772149f1027e2e98d0b56a8 Mon Sep 17 00:00:00 2001 From: Henri Dickson <90480431+alphatownsman@users.noreply.github.com> Date: Fri, 25 Aug 2023 18:35:57 -0400 Subject: [PATCH] Ignore unknown tag type in incoming post, rather than raise exception (#639) --- activities/models/post.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/activities/models/post.py b/activities/models/post.py index 8216b02..7d46463 100644 --- a/activities/models/post.py +++ b/activities/models/post.py @@ -909,13 +909,11 @@ class Post(StatorModel): elif tag_type in ["toot:emoji", "emoji"]: emoji = Emoji.by_ap_tag(post.author.domain, tag, create=True) post.emojis.add(emoji) - elif tag_type == "edition": - # Bookwyrm Edition is similar to hashtags. There should be a link to - # the book in the Note's content and a post attachment of the cover - # image. No special processing should be needed for ingest. - pass else: - raise ValueError(f"Unknown tag type {tag['type']}") + # Various ActivityPub implementations and proposals introduced tag + # types, e.g. Edition in Bookwyrm and Link in fep-e232 Object Links + # it should be safe to ignore (and log) them before a full support + pass # Visibility and to # (a post is public if it's to:public, otherwise it's unlisted if # it's cc:public, otherwise it's more limited)