Set some context

alt-html-css
Bob Mottram 2020-12-18 21:31:08 +00:00
parent 5ba7bed9a1
commit f7fc448d9b
2 changed files with 22 additions and 1 deletions

View File

@ -3772,6 +3772,22 @@ class PubServer(BaseHTTPRequestHandler):
# which isn't implemented in Epicyon
actorJson['discoverable'] = False
actorChanged = True
if not actorJson['@context'].get('orgSchema'):
actorJson['@context']['orgSchema'] = 'toot:orgSchema'
actorChanged = True
if not actorJson['@context'].get('skills'):
actorJson['@context']['skills'] = 'toot:skills'
actorChanged = True
if not actorJson['@context'].get('roles'):
actorJson['@context']['roles'] = 'toot:roles'
actorChanged = True
if not actorJson['@context'].get('availability'):
actorJson['@context']['availaibility'] = \
'toot:availability'
actorChanged = True
if actorJson.get('capabilityAcquisitionEndpoint'):
del actorJson['capabilityAcquisitionEndpoint']
actorChanged = True
# update the avatar/image url file extension
uploads = profileMediaTypesUploaded.items()
for mType, lastPart in uploads:

View File

@ -191,7 +191,12 @@ def getDefaultPersonContext() -> str:
'fingerprintKey': {'@id': 'toot:fingerprintKey', '@type': '@id'},
'messageFranking': 'toot:messageFranking',
'publicKeyBase64': 'toot:publicKeyBase64',
'discoverable': 'toot:discoverable'
'discoverable': 'toot:discoverable',
'orgSchema': 'toot:orgSchema',
'shares': 'toot:shares',
'skills': 'toot:skills',
'roles': 'toot:roles',
'availability': 'toot:availability'
}