mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-01-23 19:36:56 -08:00
detect friendica
This commit is contained in:
parent
bb3798428e
commit
c5055cd09f
2 changed files with 5 additions and 2 deletions
|
@ -892,12 +892,15 @@ def refresh_instance_profile_task(instance_id: int):
|
|||
except requests.exceptions.JSONDecodeError as ex:
|
||||
instance_json = {}
|
||||
if 'type' in instance_json and instance_json['type'] == 'Application':
|
||||
# 'name' is unreliable as the admin can change it to anything. todo: find better way
|
||||
if instance_json['name'].lower() == 'kbin':
|
||||
software = 'Kbin'
|
||||
elif instance_json['name'].lower() == 'mbin':
|
||||
software = 'Mbin'
|
||||
elif instance_json['name'].lower() == 'piefed':
|
||||
software = 'PieFed'
|
||||
elif instance_json['name'].lower() == 'system account':
|
||||
software = 'Friendica'
|
||||
else:
|
||||
software = 'Lemmy'
|
||||
instance.inbox = instance_json['inbox']
|
||||
|
|
|
@ -343,8 +343,8 @@ def activitypub_application():
|
|||
'@context': default_context(),
|
||||
'type': 'Application',
|
||||
'id': f"https://{current_app.config['SERVER_NAME']}/",
|
||||
'name': g.site.name,
|
||||
'summary': g.site.description,
|
||||
'name': 'PieFed',
|
||||
'summary': g.site.name + ' - ' + g.site.description,
|
||||
'published': ap_datetime(g.site.created_at),
|
||||
'updated': ap_datetime(g.site.updated),
|
||||
'inbox': f"https://{current_app.config['SERVER_NAME']}/site_inbox",
|
||||
|
|
Loading…
Reference in a new issue