mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-11-25 11:01:12 +00:00
Merge pull request #3370 from Tak/add-hashtag-to-context
Add `as:Hashtag` to activitypub context
This commit is contained in:
commit
4d3d5d15d0
3 changed files with 6 additions and 1 deletions
|
@ -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
|
||||
|
||||
|
||||
|
|
|
@ -331,6 +331,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",
|
||||
|
|
|
@ -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",
|
||||
|
|
Loading…
Reference in a new issue