From 67309da78fd077b3c19a5fa608beeccf3fcd0b69 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Sun, 4 Feb 2024 09:29:38 +0100 Subject: [PATCH 1/1] Continued: - added alias 'rosekey' for 'misskey' - also 'smithereen' is a federating (at least peer list is provided) software --- daemon.py | 2 +- fba/commands.py | 2 +- fba/helpers/software.py | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/daemon.py b/daemon.py index 695ab04..0cfff1a 100755 --- a/daemon.py +++ b/daemon.py @@ -56,7 +56,7 @@ templates = Jinja2Templates(directory="templates") @router.get(config.get("base_url") + "/api/info.json", response_class=JSONResponse) def api_info(): - database.cursor.execute("SELECT (SELECT COUNT(domain) FROM instances), (SELECT COUNT(domain) FROM instances WHERE software IN ('pleroma', 'mastodon', 'lemmy', 'friendica', 'misskey', 'peertube', 'takahe', 'gotosocial', 'brighteon', 'wildebeest', 'bookwyrm', 'mitra', 'areionskey', 'mammuthus', 'neodb')), (SELECT COUNT(blocker) FROM blocks), (SELECT COUNT(domain) FROM instances WHERE last_error_details IS NOT NULL)") + database.cursor.execute("SELECT (SELECT COUNT(domain) FROM instances), (SELECT COUNT(domain) FROM instances WHERE software IN ('pleroma', 'mastodon', 'lemmy', 'friendica', 'misskey', 'peertube', 'takahe', 'gotosocial', 'brighteon', 'wildebeest', 'bookwyrm', 'mitra', 'areionskey', 'mammuthus', 'neodb', 'smithereen')), (SELECT COUNT(blocker) FROM blocks), (SELECT COUNT(domain) FROM instances WHERE last_error_details IS NOT NULL)") row = database.cursor.fetchone() return JSONResponse(status_code=200, content={ diff --git a/fba/commands.py b/fba/commands.py index cb612ba..561815c 100644 --- a/fba/commands.py +++ b/fba/commands.py @@ -1007,7 +1007,7 @@ def fetch_instances(args: argparse.Namespace) -> int: database.cursor.execute( "SELECT domain, origin, software \ FROM instances \ -WHERE software IN ('pleroma', 'mastodon', 'friendica', 'misskey', 'lemmy', 'peertube', 'takahe', 'gotosocial', 'brighteon', 'wildebeest', 'bookwyrm', 'mitra', 'areionskey', 'mammuthus', 'neodb') \ +WHERE software IN ('pleroma', 'mastodon', 'friendica', 'misskey', 'lemmy', 'peertube', 'takahe', 'gotosocial', 'brighteon', 'wildebeest', 'bookwyrm', 'mitra', 'areionskey', 'mammuthus', 'neodb', 'smithereen') \ AND (last_instance_fetch IS NULL OR last_instance_fetch < ?) \ ORDER BY total_peers DESC, last_response_time ASC, last_updated ASC", [time.time() - config.get("recheck_instance")] ) diff --git a/fba/helpers/software.py b/fba/helpers/software.py index b68f4ed..4a78ab3 100644 --- a/fba/helpers/software.py +++ b/fba/helpers/software.py @@ -62,7 +62,8 @@ _misskey_aliases = [ "lycheebridge", "goblin", "miraiskey", - "lovers" + "lovers", + "rosekey" ] @lru_cache -- 2.39.5