Bot status of the admin account

merge-requests/3/merge
Bob Mottram 2019-11-13 13:17:35 +00:00
parent f3b418e6b2
commit afcd2e29ac
1 changed files with 5 additions and 1 deletions

View File

@ -55,12 +55,16 @@ def metaDataInstance(instanceTitle: str, \
if not adminActor: if not adminActor:
return {} return {}
isBot=False
if adminActor['type']!='Person':
isBot=True
instance = { instance = {
'approval_required': False, 'approval_required': False,
'contact_account': {'acct': adminActor['preferredUsername'], 'contact_account': {'acct': adminActor['preferredUsername'],
'avatar': adminActor['icon']['url'], 'avatar': adminActor['icon']['url'],
'avatar_static': adminActor['icon']['url'], 'avatar_static': adminActor['icon']['url'],
'bot': False, 'bot': isBot,
'created_at': '2019-07-01T10:30:00Z', 'created_at': '2019-07-01T10:30:00Z',
'display_name': adminActor['name'], 'display_name': adminActor['name'],
'emojis': [], 'emojis': [],