From 6b2638665db099dc17369d932d27acb32c3b68e4 Mon Sep 17 00:00:00 2001 From: Mint <> Date: Sat, 23 Jul 2022 00:24:47 +0300 Subject: [PATCH] Troonkoma compatibility --- fetch_blocks.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fetch_blocks.py b/fetch_blocks.py index 3f959ae..4f1fe71 100644 --- a/fetch_blocks.py +++ b/fetch_blocks.py @@ -69,7 +69,10 @@ def get_type(domain: str) -> str: if res.ok and "text/html" in res.headers["content-type"]: res = get(f"https://{domain}/nodeinfo/2.1", headers=headers, timeout=5) if res.ok: - return res.json()["software"]["name"] + if res.json()["software"]["name"] == "akkoma" + return "pleroma" + else + return res.json()["software"]["name"] elif res.status_code == 404: res = get(f"https://{domain}/api/v1/instance", headers=headers, timeout=5) if res.ok: -- 2.39.5