mirror of https://gitlab.com/bashrc2/epicyon
Extra actor capability
parent
035fb45272
commit
1002e078e6
13
person.py
13
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
|
||||
|
|
Loading…
Reference in New Issue