Check earlier

main
Bob Mottram 2020-10-11 14:15:36 +01:00
parent c9981f6936
commit 93e554efb8
1 changed files with 4 additions and 4 deletions

View File

@ -2227,6 +2227,10 @@ def inboxAfterInitial(recentPostsCache: {}, maxRecentPosts: int,
followingFilename = \
baseDir + '/accounts/' + \
nickname + '@' + domain + '/following.txt'
if not os.path.isfile(followingFilename):
print('No following.txt file exists for ' +
nickname + '@' + domain)
return False
if not postJsonObject.get('actor'):
return False
sendingActor = postJsonObject['actor']
@ -2238,10 +2242,6 @@ def inboxAfterInitial(recentPostsCache: {}, maxRecentPosts: int,
sendH = \
sendingActorNickname + '@' + sendingActorDomain
if sendH != nickname + '@' + domain:
if not os.path.isfile(followingFilename):
print('No following.txt file exists for ' +
nickname + '@' + domain)
return False
if sendH not in \
open(followingFilename).read():
print(nickname + '@' + domain +