mirror of https://gitlab.com/bashrc2/epicyon
Check for type
parent
44d386db86
commit
95eed2183a
|
@ -6657,14 +6657,16 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
|
||||
# this account is a bot
|
||||
if fields.get('isBot'):
|
||||
if fields['isBot'] == 'on':
|
||||
if fields['isBot'] == 'on' and \
|
||||
actor_json.get('type'):
|
||||
if actor_json['type'] != 'Service':
|
||||
actor_json['type'] = 'Service'
|
||||
actor_changed = True
|
||||
else:
|
||||
# this account is a group
|
||||
if fields.get('isGroup'):
|
||||
if fields['isGroup'] == 'on':
|
||||
if fields['isGroup'] == 'on' and \
|
||||
actor_json.get('type'):
|
||||
if actor_json['type'] != 'Group':
|
||||
# only allow admin to create groups
|
||||
if path.startswith('/users/' +
|
||||
|
@ -6673,6 +6675,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
actor_changed = True
|
||||
else:
|
||||
# this account is a person (default)
|
||||
if actor_json.get('type'):
|
||||
if actor_json['type'] != 'Person':
|
||||
actor_json['type'] = 'Person'
|
||||
actor_changed = True
|
||||
|
@ -7700,6 +7703,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
moved_to = actor_json['movedTo']
|
||||
if '"' in moved_to:
|
||||
moved_to = moved_to.split('"')[1]
|
||||
if actor_json.get('type'):
|
||||
if actor_json['type'] == 'Group':
|
||||
is_group = True
|
||||
locked_account = get_locked_account(actor_json)
|
||||
|
|
Loading…
Reference in New Issue