Apply word filter to skill names

merge-requests/8/head
Bob Mottram 2020-12-19 10:10:47 +00:00
parent 93da5f9b72
commit 8f1ded15a3
1 changed files with 5 additions and 1 deletions

View File

@ -3773,7 +3773,8 @@ class PubServer(BaseHTTPRequestHandler):
actorJson['discoverable'] = False actorJson['discoverable'] = False
actorChanged = True actorChanged = True
if not actorJson['@context'][2].get('orgSchema'): if not actorJson['@context'][2].get('orgSchema'):
actorJson['@context'][2]['orgSchema'] = 'toot:orgSchema' actorJson['@context'][2]['orgSchema'] = \
'toot:orgSchema'
actorChanged = True actorChanged = True
if not actorJson['@context'][2].get('skills'): if not actorJson['@context'][2].get('skills'):
actorJson['@context'][2]['skills'] = 'toot:skills' actorJson['@context'][2]['skills'] = 'toot:skills'
@ -3835,6 +3836,9 @@ class PubServer(BaseHTTPRequestHandler):
if not skillName: if not skillName:
skillCtr += 1 skillCtr += 1
continue continue
if isFiltered(baseDir, nickname, domain, skillName):
skillCtr += 1
continue
skillValue = \ skillValue = \
fields.get('skillValue' + str(skillCtr)) fields.get('skillValue' + str(skillCtr))
if not skillValue: if not skillValue: