1
0
mirror of https://git.sr.ht/~tsileo/microblog.pub synced 2025-06-05 21:59:23 +02:00

Add support for voting on Question

This commit is contained in:
Thomas Sileo
2022-07-23 19:02:06 +02:00
parent 4046fa0506
commit d67a44bb59
8 changed files with 187 additions and 6 deletions

View File

@ -35,6 +35,7 @@ AS_EXTENDED_CTX = [
"featured": {"@id": "toot:featured", "@type": "@id"},
"Emoji": "toot:Emoji",
"blurhash": "toot:blurhash",
"votersCount": "toot:votersCount",
# schema
"schema": "http://schema.org#",
"PropertyValue": "schema:PropertyValue",
@ -281,7 +282,7 @@ def wrap_object(activity: RawObject) -> RawObject:
def wrap_object_if_needed(raw_object: RawObject) -> RawObject:
if raw_object["type"] in ["Note"]:
if raw_object["type"] in ["Note", "Article", "Question"]:
return wrap_object(raw_object)
return raw_object