From 2aeac58f5ecdcdb3c84e4d2b7bb49c24c3816b41 Mon Sep 17 00:00:00 2001 From: rimu <3310831+rimu@users.noreply.github.com> Date: Tue, 22 Oct 2024 19:48:23 +1300 Subject: [PATCH] check instance.nodeinfo_href is not none --- app/cli.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/cli.py b/app/cli.py index ac20c847..85d1dbd7 100644 --- a/app/cli.py +++ b/app/cli.py @@ -213,7 +213,7 @@ def register(app): HEADERS = {'User-Agent': 'PieFed/1.0', 'Accept': 'application/activity+json'} for instance in instances: nodeinfo_href = instance.nodeinfo_href - if instance.software == 'lemmy' and instance.version == '0.19.4' and instance.nodeinfo_href.endswith('nodeinfo/2.0.json'): + if instance.software == 'lemmy' and instance.version >= '0.19.4' and instance.nodeinfo_href and instance.nodeinfo_href.endswith('nodeinfo/2.0.json'): nodeinfo_href = None # Lemmy v0.19.4 no longer provides .well-known/nodeinfo response for 2.0, and # 'solves' this by redirecting calls for nodeinfo/2.0.json to nodeinfo/2.1 if not nodeinfo_href: