Report from with blocked posts

main2
Bob Mottram 2019-10-18 20:12:21 +01:00
parent 4ea799f264
commit 303f7e2572
1 changed files with 2 additions and 2 deletions

View File

@ -216,13 +216,13 @@ def savePostToInboxQueue(baseDir: str,httpPrefix: str, \
if isinstance(postJsonObject['object']['inReplyTo'], str): if isinstance(postJsonObject['object']['inReplyTo'], str):
replyDomain,replyPort=getDomainFromActor(postJsonObject['object']['inReplyTo']) replyDomain,replyPort=getDomainFromActor(postJsonObject['object']['inReplyTo'])
if isBlockedDomain(baseDir,replyDomain): if isBlockedDomain(baseDir,replyDomain):
print('WARN: post contains reply to a blocked domain: '+replyDomain) print('WARN: post contains reply from '+str(actor)+' to a blocked domain: '+replyDomain)
return None return None
else: else:
replyNickname=getNicknameFromActor(postJsonObject['object']['inReplyTo']) replyNickname=getNicknameFromActor(postJsonObject['object']['inReplyTo'])
if replyNickname and replyDomain: if replyNickname and replyDomain:
if isBlocked(baseDir,nickname,domain,replyNickname,replyDomain): if isBlocked(baseDir,nickname,domain,replyNickname,replyDomain):
print('WARN: post contains reply to a blocked account: '+replyNickname+'@'+replyDomain) print('WARN: post contains reply from '+str(actor)+' to a blocked account: '+replyNickname+'@'+replyDomain)
return None return None
else: else:
print('WARN: post is a reply to an unidentified account: '+postJsonObject['object']['inReplyTo']) print('WARN: post is a reply to an unidentified account: '+postJsonObject['object']['inReplyTo'])