From 93e554efb8d9c54820786e560317c655fef9c8b5 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 11 Oct 2020 14:15:36 +0100 Subject: [PATCH] Check earlier --- inbox.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/inbox.py b/inbox.py index 652e9a99..b79fc963 100644 --- a/inbox.py +++ b/inbox.py @@ -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 +