Re-enable shared unbox updates

main2
Bob Mottram 2019-11-07 21:12:53 +00:00
parent 49a1169e67
commit 4225c40e48
1 changed files with 12 additions and 18 deletions

View File

@ -1672,11 +1672,7 @@ def sendToFollowers(session,baseDir: str, \
cc='' cc=''
isUpdate=False if withSharedInbox:
if postJsonObject['type']=='Update':
idUpdate=True
if withSharedInbox and not isUpdate:
toNickname=followerHandles[index].split('@')[0] toNickname=followerHandles[index].split('@')[0]
# if there are more than one followers on the domain # if there are more than one followers on the domain
@ -1684,17 +1680,17 @@ def sendToFollowers(session,baseDir: str, \
if len(followerHandles)>1: if len(followerHandles)>1:
toNickname='inbox' toNickname='inbox'
#if toNickname!='inbox' and postJsonObject.get('type'): if toNickname!='inbox' and postJsonObject.get('type'):
# if postJsonObject['type']=='Update': if postJsonObject['type']=='Update':
# if postJsonObject.get('object'): if postJsonObject.get('object'):
# if isinstance(postJsonObject['object'], dict): if isinstance(postJsonObject['object'], dict):
# if postJsonObject['object'].get('type'): if postJsonObject['object'].get('type'):
# if postJsonObject['object']['type']=='Person' or \ if postJsonObject['object']['type']=='Person' or \
# postJsonObject['object']['type']=='Application' or \ postJsonObject['object']['type']=='Application' or \
# postJsonObject['object']['type']=='Group' or \ postJsonObject['object']['type']=='Group' or \
# postJsonObject['object']['type']=='Service': postJsonObject['object']['type']=='Service':
# print('Sending profile update to shared inbox of '+toDomain) print('Sending profile update to shared inbox of '+toDomain)
# toNickname='inbox' toNickname='inbox'
if debug: if debug:
print('DEBUG: Sending from '+nickname+'@'+domain+' to '+toNickname+'@'+toDomain) print('DEBUG: Sending from '+nickname+'@'+domain+' to '+toNickname+'@'+toDomain)
@ -1717,8 +1713,6 @@ def sendToFollowers(session,baseDir: str, \
print('DEBUG: Sending from '+nickname+'@'+domain+' to '+toNickname+'@'+toDomain) print('DEBUG: Sending from '+nickname+'@'+domain+' to '+toNickname+'@'+toDomain)
else: else:
print('DEBUG: Sending profile update from '+nickname+'@'+domain+' to '+toNickname+'@'+toDomain) print('DEBUG: Sending profile update from '+nickname+'@'+domain+' to '+toNickname+'@'+toDomain)
if isUpdate:
postJsonObject['cc']=[httpPrefix+'://'+toDomain+'/users/'+toNickname]
sendSignedJson(postJsonObject,session,baseDir, \ sendSignedJson(postJsonObject,session,baseDir, \
nickname,domain,port, \ nickname,domain,port, \