From ab64f2a2c510b94f6d26a4cc8b87557b4b20ddf0 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Thu, 22 Aug 2019 20:47:10 +0100 Subject: [PATCH] Send profile updates to shared inbox --- posts.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/posts.py b/posts.py index 7d2102e0..aed0b17f 100644 --- a/posts.py +++ b/posts.py @@ -1466,6 +1466,17 @@ def sendToFollowers(session,baseDir: str, \ if len(followerHandles)>1: nickname='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: print('DEBUG: Sending from '+nickname+'@'+domain+' to '+toNickname+'@'+toDomain) sendSignedJson(postJsonObject,session,baseDir, \