From a608499323ac52ae9346c0ae012dfff716bf8c2a Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Fri, 23 Aug 2019 18:03:50 +0100 Subject: [PATCH] actor inbox --- posts.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/posts.py b/posts.py index 0f4121a4e..f6c1043f5 100644 --- a/posts.py +++ b/posts.py @@ -982,9 +982,6 @@ def sendPost(projectVersion: str, \ inboxUrl=capabilityAcquisition if not capabilityAcquisition: return 2 - else: - if noOfFollowersOnDomain(baseDir,handle,toDomain)>1 and sharedInbox: - inboxUrl=sharedInbox.replace('/inbox','/actor/inbox') if not inboxUrl: return 3 @@ -1216,9 +1213,8 @@ def sendSignedJson(postJsonObject: {},session,baseDir: str, \ print("inboxUrl: "+inboxUrl) print("toPersonId: "+toPersonId) print("sharedInboxUrl: "+sharedInboxUrl) - print("avatarUrl: "+avatarUrl) - if sharedInbox and sharedInboxUrl: - inboxUrl=sharedInboxUrl.replace('/inbox','/actor/inbox') + if inboxUrl.endswith('/actor/inbox'): + inboxUrl=sharedInboxUrl if not inboxUrl: if debug: @@ -1249,7 +1245,7 @@ def sendSignedJson(postJsonObject: {},session,baseDir: str, \ if debug: print('DEBUG: '+toDomain+' is not in '+inboxUrl) return 7 - postPath=inboxUrl.split(toDomain)[1] + postPath=inboxUrl.split(toDomain,1)[1] # convert json to string so that there are no # subsequent conversions after creating message body digest