From 1002e078e68d3fa914e88629e20b38eecd7825e8 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Thu, 16 May 2024 12:50:12 +0100 Subject: [PATCH] Extra actor capability --- person.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/person.py b/person.py index 4a8a36b8d..bdbf9a221 100644 --- a/person.py +++ b/person.py @@ -521,7 +521,10 @@ def _create_person_base(base_dir: str, nickname: str, domain: str, port: int, }, 'inbox': inbox_str, 'manuallyApprovesFollowers': approve_followers, - 'capabilities': {'acceptsChatMessages': False}, + 'capabilities': { + 'acceptsChatMessages': False, + 'supportsFriendRequests': False + }, 'discoverable': True, 'indexable': False, 'searchableBy': [], @@ -860,12 +863,18 @@ def person_upgrade_actor(base_dir: str, person_json: {}, update_actor = True if 'capabilities' not in person_json: - person_json['capabilities'] = {'acceptsChatMessages': False} + person_json['capabilities'] = { + 'acceptsChatMessages': False, + 'supportsFriendRequests': False + } update_actor = True else: if 'acceptsChatMessages' not in person_json['capabilities']: person_json['capabilities']['acceptsChatMessages'] = False update_actor = True + if 'supportsFriendRequests' not in person_json['capabilities']: + person_json['capabilities']['supportsFriendRequests'] = False + update_actor = True if 'memorial' not in person_json: person_json['memorial'] = False