From 5c2905d57dcadd1dad88af7bc0bb3f67b053de00 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 19 Jan 2020 20:19:56 +0000 Subject: [PATCH] Add nomadicLocations to actor --- person.py | 9 ++++++++- posts.py | 6 +++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/person.py b/person.py index ae8f901f..1303969b 100644 --- a/person.py +++ b/person.py @@ -210,7 +210,14 @@ def createPersonBase(baseDir: str,nickname: str,domain: str,port: int, \ }, 'tag': [], 'type': personType, - 'url': personUrl + 'url': personUrl, + 'nomadicLocations': [{ + 'id': personId, + 'type': 'nomadicLocation', + 'locationAddress':'acct:'+nickname+'@'+domain, + 'locationPrimary':True, + 'locationDeleted':False + }] } if nickname=='inbox': diff --git a/posts.py b/posts.py index 19cae1eb..a2c2573f 100644 --- a/posts.py +++ b/posts.py @@ -2260,7 +2260,7 @@ def createBoxIndexed(recentPostsCache: {}, \ domain=domain+':'+str(port) boxActor=httpPrefix+'://'+domain+'/users/'+nickname - + pageStr='?page=true' if pageNumber: try: @@ -2689,7 +2689,7 @@ def downloadAnnounce(session,baseDir: str,httpPrefix: str, \ announcedJson= \ getJson(session,postJsonObject['object'],asHeader, \ None,projectVersion,httpPrefix,domain) - + if not announcedJson: return None @@ -2716,7 +2716,7 @@ def downloadAnnounce(session,baseDir: str,httpPrefix: str, \ rejectAnnounce(announceFilename) #pprint(announcedJson) return None - + # wrap in create to be consistent with other posts announcedJson= \ outboxMessageCreateWrap(httpPrefix, \