From dd6916b58067c6cb7ab0759f438569cddda0aa55 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Thu, 7 Nov 2019 20:51:29 +0000 Subject: [PATCH] cc to individual recipients --- posts.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/posts.py b/posts.py index 413e725e..d60023aa 100644 --- a/posts.py +++ b/posts.py @@ -1671,7 +1671,12 @@ def sendToFollowers(session,baseDir: str, \ toDomain=toDomain.split(':')[0] cc='' - if withSharedInbox and postJsonObject['type']!='Update': + + isUpdate=False + if postJsonObject['type']=='Update': + idUpdate=True + + if withSharedInbox and not isUpdate: toNickname=followerHandles[index].split('@')[0] # if there are more than one followers on the domain @@ -1712,6 +1717,8 @@ def sendToFollowers(session,baseDir: str, \ print('DEBUG: Sending from '+nickname+'@'+domain+' to '+toNickname+'@'+toDomain) else: print('DEBUG: Sending profile update from '+nickname+'@'+domain+' to '+toNickname+'@'+toDomain) + if isUpdate: + postJsonObject['cc']=[httpPrefix+'://'+toDomain+'/users/'+toNickname] sendSignedJson(postJsonObject,session,baseDir, \ nickname,domain,port, \ toNickname,toDomain,toPort, \ @@ -1722,7 +1729,7 @@ def sendToFollowers(session,baseDir: str, \ if debug: print('DEBUG: End of sendToFollowers') - time.sleep(2) + time.sleep(4) def sendToFollowersThread(session,baseDir: str, \ nickname: str, domain: str, port: int, \