]> git.mxchange.org Git - fba.git/commitdiff
Continued:
authorRoland Häder <roland@mxchange.org>
Mon, 11 Mar 2024 21:28:00 +0000 (22:28 +0100)
committerRoland Häder <roland@mxchange.org>
Mon, 11 Mar 2024 21:28:00 +0000 (22:28 +0100)
- added aliases for misskey, mastodon and pleroma (each one)
- moved mastodon aliases to module ("private") variable, please don't access it
  outside the module!

fba/helpers/software.py

index 7ce6fdbf8b7c798e4d093caec229f6db628274c0..43746d808aa34a08872fd2daa2d8be9e7d0e0c16 100644 (file)
@@ -31,6 +31,16 @@ relays = [
     "pub-relay"
 ]
 
+# Aliases for mastodon
+_mastodon_aliases = [
+    "hometown",
+    "ecko",
+    "fedibird",
+    "glitchcafe",
+    "kmyblue",
+    "nagitodon"
+]
+
 # Aliases for misskey
 _misskey_aliases = [
     "slipfox calckey",
@@ -64,7 +74,8 @@ _misskey_aliases = [
     "miraiskey",
     "lovers",
     "rosekey",
-    "hijikey"
+    "hijikey",
+    "shrimpkey"
 ]
 
 @lru_cache
@@ -83,13 +94,13 @@ def alias(software: str) -> str:
     cleared = tidyup.domain(software)
     logger.debug("cleared='%s'- AFTER!", cleared)
 
-    if cleared in ["akkoma", "rebased", "akkounfucked", "ched", "incestoma", "revolver"]:
+    if cleared in ["akkoma", "rebased", "akkounfucked", "ched", "incestoma", "revolver"] or "pleroma" in cleared:
         logger.debug("Setting pleroma: cleared='%s'", cleared)
         cleared = "pleroma"
     elif "radiant" in cleared:
         logger.debug("Setting radiant: cleared='%s'", cleared)
         cleared = "radiant"
-    elif cleared in ["hometown", "ecko", "fedibird", "glitchcafe", "kmyblue"] or "되는 마스토돈" in cleared or "mastodon" in cleared:
+    elif cleared in _mastodon_aliases or "되는 마스토돈" in cleared or "mastodon" in cleared:
         logger.debug("Setting mastodon: cleared='%s'", cleared)
         cleared = "mastodon"
     elif cleared in _misskey_aliases or "shumihub" in cleared or "мисскей" in cleared or "milkey" in cleared or "misskey" in cleared: