Add nomadicLocations to actor

main
Bob Mottram 2020-01-19 20:19:56 +00:00
parent c2187aa007
commit 5c2905d57d
2 changed files with 11 additions and 4 deletions

View File

@ -210,7 +210,14 @@ def createPersonBase(baseDir: str,nickname: str,domain: str,port: int, \
}, },
'tag': [], 'tag': [],
'type': personType, 'type': personType,
'url': personUrl 'url': personUrl,
'nomadicLocations': [{
'id': personId,
'type': 'nomadicLocation',
'locationAddress':'acct:'+nickname+'@'+domain,
'locationPrimary':True,
'locationDeleted':False
}]
} }
if nickname=='inbox': if nickname=='inbox':

View File

@ -2260,7 +2260,7 @@ def createBoxIndexed(recentPostsCache: {}, \
domain=domain+':'+str(port) domain=domain+':'+str(port)
boxActor=httpPrefix+'://'+domain+'/users/'+nickname boxActor=httpPrefix+'://'+domain+'/users/'+nickname
pageStr='?page=true' pageStr='?page=true'
if pageNumber: if pageNumber:
try: try:
@ -2689,7 +2689,7 @@ def downloadAnnounce(session,baseDir: str,httpPrefix: str, \
announcedJson= \ announcedJson= \
getJson(session,postJsonObject['object'],asHeader, \ getJson(session,postJsonObject['object'],asHeader, \
None,projectVersion,httpPrefix,domain) None,projectVersion,httpPrefix,domain)
if not announcedJson: if not announcedJson:
return None return None
@ -2716,7 +2716,7 @@ def downloadAnnounce(session,baseDir: str,httpPrefix: str, \
rejectAnnounce(announceFilename) rejectAnnounce(announceFilename)
#pprint(announcedJson) #pprint(announcedJson)
return None return None
# wrap in create to be consistent with other posts # wrap in create to be consistent with other posts
announcedJson= \ announcedJson= \
outboxMessageCreateWrap(httpPrefix, \ outboxMessageCreateWrap(httpPrefix, \