mirror of
https://github.com/jointakahe/takahe.git
synced 2024-11-25 16:51:00 +00:00
Ignore unknown tag type in incoming post, rather than raise exception (#639)
This commit is contained in:
parent
b003af64cc
commit
555046ac4d
1 changed files with 4 additions and 6 deletions
|
@ -909,13 +909,11 @@ class Post(StatorModel):
|
||||||
elif tag_type in ["toot:emoji", "emoji"]:
|
elif tag_type in ["toot:emoji", "emoji"]:
|
||||||
emoji = Emoji.by_ap_tag(post.author.domain, tag, create=True)
|
emoji = Emoji.by_ap_tag(post.author.domain, tag, create=True)
|
||||||
post.emojis.add(emoji)
|
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:
|
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
|
# Visibility and to
|
||||||
# (a post is public if it's to:public, otherwise it's unlisted if
|
# (a post is public if it's to:public, otherwise it's unlisted if
|
||||||
# it's cc:public, otherwise it's more limited)
|
# it's cc:public, otherwise it's more limited)
|
||||||
|
|
Loading…
Reference in a new issue