diff --git a/app/activitypub/util.py b/app/activitypub/util.py index 239dedcf..3ea9040c 100644 --- a/app/activitypub/util.py +++ b/app/activitypub/util.py @@ -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'] diff --git a/app/main/routes.py b/app/main/routes.py index 68eca138..cc2a69aa 100644 --- a/app/main/routes.py +++ b/app/main/routes.py @@ -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",