Send profile updates to shared inbox

master
Bob Mottram 2019-08-22 20:47:10 +01:00
parent f844c99517
commit ab64f2a2c5
1 changed files with 11 additions and 0 deletions

View File

@ -1466,6 +1466,17 @@ def sendToFollowers(session,baseDir: str, \
if len(followerHandles)>1: if len(followerHandles)>1:
nickname='inbox' nickname='inbox'
toNickname='inbox' toNickname='inbox'
# If this is a profile update then send to shared inbox
if postJsonObject.get('type'):
if postJsonObject['type']=='Update':
if postJsonObject.get('object'):
if isinstance(postJsonObject['object'], dict):
if postJsonObject['object'].get('type'):
if postJsonObject['object']['type']=='Person':
print('Sending profile update to shared inbox of '+toDomain)
toNickname='inbox'
if debug: if debug:
print('DEBUG: Sending from '+nickname+'@'+domain+' to '+toNickname+'@'+toDomain) print('DEBUG: Sending from '+nickname+'@'+domain+' to '+toNickname+'@'+toDomain)
sendSignedJson(postJsonObject,session,baseDir, \ sendSignedJson(postJsonObject,session,baseDir, \