From cf729200b05eb784eafaf6bfbb1389f1dea401ef Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 11 Oct 2020 14:18:27 +0100 Subject: [PATCH] More verbose --- inbox.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/inbox.py b/inbox.py index b79fc9638..65357c9fc 100644 --- a/inbox.py +++ b/inbox.py @@ -2227,10 +2227,6 @@ 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'] @@ -2239,6 +2235,13 @@ def inboxAfterInitial(recentPostsCache: {}, maxRecentPosts: int, sendingActorDomain, sendingActorPort = \ getDomainFromActor(sendingActor) if sendingActorNickname and sendingActorDomain: + if not os.path.isfile(followingFilename): + print('No following.txt file exists for ' + + nickname + '@' + domain + + 'so not accepting DM from ' + + sendingActorNickname + '@' + + sendingActorDomain) + return False sendH = \ sendingActorNickname + '@' + sendingActorDomain if sendH != nickname + '@' + domain: