From 18629c88a827ae69a1c9ce1a9727d0103123882f Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Mon, 15 Jul 2019 19:29:30 +0100 Subject: [PATCH] More debug --- posts.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/posts.py b/posts.py index 77b71f86..b4850d0a 100644 --- a/posts.py +++ b/posts.py @@ -792,6 +792,9 @@ def sendToNamedAddresses(session,baseDir: str, \ recipients.append(address) if not recipients: return + if debug: + print('c2s sending to addresses: '+str(recipients)) + # this is after the message has arrived at the server clientToServer=False for address in recipients: toNickname=getNicknameFromActor(address) @@ -800,6 +803,8 @@ def sendToNamedAddresses(session,baseDir: str, \ toDomain,toPort=getDomainFromActor(address) if not toDomain: continue + if debug: + print('c2s sending from '+nickname+'@'+domain+' to '+toNickname+'@'+toDomain) sendSignedJson(postJsonObject,session,baseDir, \ nickname,domain,port, \ toNickname,toDomain,toPort, \ @@ -818,12 +823,17 @@ def sendToFollowers(session,baseDir: str, \ """ if not postIsAddressedToFollowers(baseDir,nickname,domain, \ port,httpPrefix,postJsonObject): + if debug: + print('Post is not addressed to followers') return grouped=groupFollowersByDomain(baseDir,nickname,domain) if not grouped: + if debug: + print('Post to followers did not resolve any domains') return + # this is after the message has arrived at the server clientToServer=False # for each instance @@ -839,6 +849,8 @@ def sendToFollowers(session,baseDir: str, \ if len(followerHandles)>1: nickname='inbox' toNickname='inbox' + if debug: + print('Sending from '+nickname+'@'+domain+' to '+toNickname+'@'+toDomain) sendSignedJson(postJsonObject,session,baseDir, \ nickname,domain,port, \ toNickname,toDomain,toPort, \