]> git.mxchange.org Git - fba.git/commitdiff
Troonkoma compatibility
authorMint <>
Fri, 22 Jul 2022 21:24:47 +0000 (00:24 +0300)
committerMint <>
Fri, 22 Jul 2022 21:24:47 +0000 (00:24 +0300)
fetch_blocks.py

index 3f959ae7dd479c82f8085623ffb76f92c53988f9..4f1fe71c361c6f214af4f92a97b0926a80057e59 100644 (file)
@@ -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: