Check actor exists

master
Bob Mottram 2019-09-01 20:20:28 +01:00
parent 039f8ade67
commit b9d853ef63
1 changed files with 8 additions and 0 deletions

View File

@ -189,6 +189,14 @@ def savePostToInboxQueue(baseDir: str,httpPrefix: str, \
actor=postJsonObject['actor']
postNickname=getNicknameFromActor(postJsonObject['actor'])
postDomain,postPort=getDomainFromActor(postJsonObject['actor'])
if not postNickname:
pprint(postJsonObject)
print('No post Nickname in actor')
return None
if not postDomain:
pprint(postJsonObject)
print('No post Domain in actor')
return None
if isBlocked(baseDir,nickname,domain,postNickname,postDomain):
if debug:
print('DEBUG: post from '+postNickname+' blocked')