mirror of https://gitlab.com/bashrc2/epicyon
shares endpoints
parent
f510470d07
commit
35fab69ccd
10
person.py
10
person.py
|
@ -434,6 +434,8 @@ def _create_person_base(base_dir: str, nickname: str, domain: str, port: int,
|
||||||
'endpoints': {
|
'endpoints': {
|
||||||
'id': person_id + '/endpoints',
|
'id': person_id + '/endpoints',
|
||||||
'sharedInbox': http_prefix + '://' + domain + '/inbox',
|
'sharedInbox': http_prefix + '://' + domain + '/inbox',
|
||||||
|
'offers': person_id + '/offers',
|
||||||
|
'wanted': person_id + '/wanted'
|
||||||
},
|
},
|
||||||
'featured': person_id + '/collections/featured',
|
'featured': person_id + '/collections/featured',
|
||||||
'featuredTags': person_id + '/collections/tags',
|
'featuredTags': person_id + '/collections/tags',
|
||||||
|
@ -802,6 +804,14 @@ def person_upgrade_actor(base_dir: str, person_json: {},
|
||||||
person_json['published'] = published
|
person_json['published'] = published
|
||||||
update_actor = True
|
update_actor = True
|
||||||
|
|
||||||
|
if person_json.get('endpoints'):
|
||||||
|
if not person_json['endpoints'].get('offers'):
|
||||||
|
person_json['endpoints']['offers'] = person_json['id'] + '/offers'
|
||||||
|
update_actor = True
|
||||||
|
if not person_json['endpoints'].get('wanted'):
|
||||||
|
person_json['endpoints']['wanted'] = person_json['id'] + '/wanted'
|
||||||
|
update_actor = True
|
||||||
|
|
||||||
if person_json.get('shares'):
|
if person_json.get('shares'):
|
||||||
if person_json['shares'].endswith('/shares'):
|
if person_json['shares'].endswith('/shares'):
|
||||||
person_json['shares'] = person_json['id'] + '/catalog'
|
person_json['shares'] = person_json['id'] + '/catalog'
|
||||||
|
|
Loading…
Reference in New Issue