Set flag if users path is found

main
Bob Mottram 2021-07-04 20:59:08 +01:00
parent 4697de88c0
commit 907f3d8366
2 changed files with 11 additions and 11 deletions

View File

@ -1220,6 +1220,7 @@ def getActorJson(hostDomain: str, handle: str, http: bool, gnunet: bool,
nickname = handle.split(userPath)[1]
nickname = nickname.replace('\n', '').replace('\r', '')
domain = handle.split(userPath)[0]
userPathFound = True
break
if not userPathFound and '://' in originalHandle:
domain = originalHandle.split('://')[1]
@ -1245,6 +1246,7 @@ def getActorJson(hostDomain: str, handle: str, http: bool, gnunet: bool,
nickname = handle.split('@')[0]
domain = handle.split('@')[1]
domain = domain.replace('\n', '').replace('\r', '')
cachedWebfingers = {}
proxyType = None
if http or domain.endswith('.onion'):

View File

@ -83,17 +83,15 @@ def setActorSkillLevel(actorJson: {},
if not actorJson:
return True
if not actorJson.get('hasOccupation'):
actorJson['hasOccupation'] = [
{
'@type': 'Occupation',
'name': '',
"occupationLocation": {
"@type": "City",
"name": "Fediverse"
},
'skills': []
}
]
actorJson['hasOccupation'] = [{
'@type': 'Occupation',
'name': '',
"occupationLocation": {
"@type": "City",
"name": "Fediverse"
},
'skills': []
}]
ocSkillsList = getOccupationSkills(actorJson)
skillsDict = getSkillsFromList(ocSkillsList)
if not skillsDict.get(skill):