Handle replies from blocked domains

master
Bob Mottram 2019-09-03 12:27:21 +01:00
parent 832c1cd39b
commit c392da197e
1 changed files with 1 additions and 1 deletions

View File

@ -212,7 +212,7 @@ def savePostToInboxQueue(baseDir: str,httpPrefix: str, \
replyNickname=getNicknameFromActor(postJsonObject['object']['inReplyTo']) replyNickname=getNicknameFromActor(postJsonObject['object']['inReplyTo'])
replyDomain,replyPort=getDomainFromActor(postJsonObject['object']['inReplyTo']) replyDomain,replyPort=getDomainFromActor(postJsonObject['object']['inReplyTo'])
if replyNickname and replyDomain: if replyNickname and replyDomain:
if isBlocked(baseDir,nickname,domain,postNickname,postDomain): if isBlocked(baseDir,nickname,domain,replyNickname,replyDomain):
print('WARN: post contains reply to a blocked account: '+replyNickname+'@'+replyDomain) print('WARN: post contains reply to a blocked account: '+replyNickname+'@'+replyDomain)
return None return None
if postJsonObject['object'].get('content'): if postJsonObject['object'].get('content'):