Extra actor capability

main
Bob Mottram 2024-05-16 12:50:12 +01:00
parent 035fb45272
commit 1002e078e6
1 changed files with 11 additions and 2 deletions

View File

@ -521,7 +521,10 @@ def _create_person_base(base_dir: str, nickname: str, domain: str, port: int,
}, },
'inbox': inbox_str, 'inbox': inbox_str,
'manuallyApprovesFollowers': approve_followers, 'manuallyApprovesFollowers': approve_followers,
'capabilities': {'acceptsChatMessages': False}, 'capabilities': {
'acceptsChatMessages': False,
'supportsFriendRequests': False
},
'discoverable': True, 'discoverable': True,
'indexable': False, 'indexable': False,
'searchableBy': [], 'searchableBy': [],
@ -860,12 +863,18 @@ def person_upgrade_actor(base_dir: str, person_json: {},
update_actor = True update_actor = True
if 'capabilities' not in person_json: if 'capabilities' not in person_json:
person_json['capabilities'] = {'acceptsChatMessages': False} person_json['capabilities'] = {
'acceptsChatMessages': False,
'supportsFriendRequests': False
}
update_actor = True update_actor = True
else: else:
if 'acceptsChatMessages' not in person_json['capabilities']: if 'acceptsChatMessages' not in person_json['capabilities']:
person_json['capabilities']['acceptsChatMessages'] = False person_json['capabilities']['acceptsChatMessages'] = False
update_actor = True update_actor = True
if 'supportsFriendRequests' not in person_json['capabilities']:
person_json['capabilities']['supportsFriendRequests'] = False
update_actor = True
if 'memorial' not in person_json: if 'memorial' not in person_json:
person_json['memorial'] = False person_json['memorial'] = False