Remove nomadicLocations

merge-requests/8/head
Bob Mottram 2021-01-21 18:16:43 +00:00
parent f5330c7682
commit bd66c4420f
2 changed files with 1 additions and 15 deletions

View File

@ -3873,7 +3873,7 @@ class PubServer(BaseHTTPRequestHandler):
if not actorJson.get('discoverable'):
# discoverable in profile directory
# which isn't implemented in Epicyon
actorJson['discoverable'] = False
actorJson['discoverable'] = True
actorChanged = True
if not actorJson['@context'][2].get('orgSchema'):
actorJson['@context'][2]['orgSchema'] = \
@ -3891,10 +3891,6 @@ class PubServer(BaseHTTPRequestHandler):
if not actorJson['@context'][2].get('availability'):
actorJson['@context'][2]['availaibility'] = \
'toot:availability'
if not actorJson['@context'][2].get('nomadicLocations'):
actorJson['@context'][2]['nomadicLocations'] = \
'toot:nomadicLocations'
actorChanged = True
if actorJson.get('capabilityAcquisitionEndpoint'):
del actorJson['capabilityAcquisitionEndpoint']
actorChanged = True

View File

@ -540,16 +540,6 @@ def personUpgradeActor(baseDir: str, personJson: {},
return
if not personJson:
personJson = loadJson(filename)
if not personJson.get('nomadicLocations'):
personJson['nomadicLocations'] = [{
'id': personJson['id'],
'type': 'nomadicLocation',
'locationAddress':'acct:'+handle,
'locationPrimary':True,
'locationDeleted':False
}]
print('Nomadic locations added to to actor ' + handle)
updateActor = True
if updateActor:
saveJson(personJson, filename)