mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-11-22 09:31:08 +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
|
pass
|
||||||
data = {k: v for (k, v) in data.items() if v is not None and k not in omit}
|
data = {k: v for (k, v) in data.items() if v is not None and k not in omit}
|
||||||
if "@context" 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
|
return data
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -331,6 +331,7 @@ class User(OrderedCollectionPageMixin, AbstractUser):
|
||||||
"https://w3id.org/security/v1",
|
"https://w3id.org/security/v1",
|
||||||
{
|
{
|
||||||
"manuallyApprovesFollowers": "as:manuallyApprovesFollowers",
|
"manuallyApprovesFollowers": "as:manuallyApprovesFollowers",
|
||||||
|
"Hashtag": "as:Hashtag",
|
||||||
"schema": "http://schema.org#",
|
"schema": "http://schema.org#",
|
||||||
"PropertyValue": "schema:PropertyValue",
|
"PropertyValue": "schema:PropertyValue",
|
||||||
"value": "schema:value",
|
"value": "schema:value",
|
||||||
|
|
|
@ -95,6 +95,7 @@ class User(TestCase):
|
||||||
"PropertyValue": "schema:PropertyValue",
|
"PropertyValue": "schema:PropertyValue",
|
||||||
"alsoKnownAs": {"@id": "as:alsoKnownAs", "@type": "@id"},
|
"alsoKnownAs": {"@id": "as:alsoKnownAs", "@type": "@id"},
|
||||||
"manuallyApprovesFollowers": "as:manuallyApprovesFollowers",
|
"manuallyApprovesFollowers": "as:manuallyApprovesFollowers",
|
||||||
|
"Hashtag": "as:Hashtag",
|
||||||
"movedTo": {"@id": "as:movedTo", "@type": "@id"},
|
"movedTo": {"@id": "as:movedTo", "@type": "@id"},
|
||||||
"schema": "http://schema.org#",
|
"schema": "http://schema.org#",
|
||||||
"value": "schema:value",
|
"value": "schema:value",
|
||||||
|
|
Loading…
Reference in a new issue