Add as:Hashtag to activitypub context

This commit is contained in:
Levi Bard 2024-05-23 08:56:54 +02:00
parent 4e987a0e66
commit 46544451d4
3 changed files with 6 additions and 1 deletions

View file

@ -250,7 +250,10 @@ class ActivityObject:
pass
data = {k: v for (k, v) in data.items() if v is not None and k not in omit}
if "@context" not in omit:
data["@context"] = "https://www.w3.org/ns/activitystreams"
data["@context"] = [
"https://www.w3.org/ns/activitystreams",
{"Hashtag": "as:Hashtag"},
]
return data

View file

@ -327,6 +327,7 @@ class User(OrderedCollectionPageMixin, AbstractUser):
"https://w3id.org/security/v1",
{
"manuallyApprovesFollowers": "as:manuallyApprovesFollowers",
"Hashtag": "as:Hashtag",
"schema": "http://schema.org#",
"PropertyValue": "schema:PropertyValue",
"value": "schema:value",

View file

@ -95,6 +95,7 @@ class User(TestCase):
"PropertyValue": "schema:PropertyValue",
"alsoKnownAs": {"@id": "as:alsoKnownAs", "@type": "@id"},
"manuallyApprovesFollowers": "as:manuallyApprovesFollowers",
"Hashtag": "as:Hashtag",
"movedTo": {"@id": "as:movedTo", "@type": "@id"},
"schema": "http://schema.org#",
"value": "schema:value",