Indentation

main
Bob Mottram 2020-12-21 21:40:29 +00:00
parent b257f90df2
commit a3cbc28c1e
1 changed files with 9 additions and 3 deletions

View File

@ -1385,7 +1385,13 @@ def receiveAnnounce(recentPostsCache: {},
nickname, domain, messageJson,
__version__, translate,
YTReplacementDomain)
if postJsonObject:
if not postJsonObject:
if domain not in messageJson['object'] and \
onionDomain not in messageJson['object']:
if os.path.isfile(postFilename):
# if the announce can't be downloaded then remove it
os.remove(postFilename)
else:
if debug:
print('DEBUG: Announce post downloaded for ' +
messageJson['actor'] + ' -> ' + messageJson['object'])
@ -1429,8 +1435,8 @@ def receiveAnnounce(recentPostsCache: {},
print('DEBUG: Retry ' + str(tries + 1) +
' obtaining actor for ' + lookupActor)
time.sleep(5)
if debug:
print('DEBUG: announced/repeated post arrived in inbox')
if debug:
print('DEBUG: announced/repeated post arrived in inbox')
return True