From 28afd2ed4dc0135381a19e9ea7b04aca9c12ac8d Mon Sep 17 00:00:00 2001 From: Nik Clayton Date: Thu, 25 Jan 2024 00:58:15 +0100 Subject: [PATCH] feat: Add Firefish as a server with a Mastodon API (#381) --- .../kotlin/app/pachli/core/network/Server.kt | 7 +- .../app/pachli/core/network/ServerTest.kt | 3 +- .../src/test/resources/server-versions.json5 | 115 ++++++++++-------- 3 files changed, 72 insertions(+), 53 deletions(-) diff --git a/core/network/src/main/kotlin/app/pachli/core/network/Server.kt b/core/network/src/main/kotlin/app/pachli/core/network/Server.kt index 78ed4525f..e31c73715 100644 --- a/core/network/src/main/kotlin/app/pachli/core/network/Server.kt +++ b/core/network/src/main/kotlin/app/pachli/core/network/Server.kt @@ -24,6 +24,7 @@ import app.pachli.core.common.PachliError import app.pachli.core.network.Server.Error.UnparseableVersion import app.pachli.core.network.ServerKind.AKKOMA import app.pachli.core.network.ServerKind.FEDIBIRD +import app.pachli.core.network.ServerKind.FIREFISH import app.pachli.core.network.ServerKind.FRIENDICA import app.pachli.core.network.ServerKind.GLITCH import app.pachli.core.network.ServerKind.GOTOSOCIAL @@ -156,7 +157,7 @@ data class Server( // the server operator has changed them. Try looking for a matching // .. somewhere in the version string and hope // it's correct - AKKOMA, FEDIBIRD, GLITCH, HOMETOWN, MASTODON, PIXELFED, UNKNOWN -> { + AKKOMA, FEDIBIRD, FIREFISH, GLITCH, HOMETOWN, MASTODON, PIXELFED, UNKNOWN -> { val rx = """(?\d+)\.(?\d+).(?\d+)""".toRegex() rx.find(version) .toResultOr { UnparseableVersion(version, ParseException("unexpected null", 0)) } @@ -272,7 +273,7 @@ data class Server( // Everything else. Assume server side filtering and no translation. This may be an // incorrect assumption. - AKKOMA, FEDIBIRD, FRIENDICA, GLITCH, HOMETOWN, ICESHRIMP, PIXELFED, PLEROMA, SHARKEY, UNKNOWN -> { + AKKOMA, FEDIBIRD, FIREFISH, FRIENDICA, GLITCH, HOMETOWN, ICESHRIMP, PIXELFED, PLEROMA, SHARKEY, UNKNOWN -> { c[ORG_JOINMASTODON_FILTERS_SERVER] = "1.0.0".toVersion() } } @@ -300,6 +301,7 @@ data class Server( enum class ServerKind { AKKOMA, FEDIBIRD, + FIREFISH, FRIENDICA, GLITCH, GOTOSOCIAL, @@ -321,6 +323,7 @@ enum class ServerKind { fun from(s: NodeInfo.Software) = when (s.name.lowercase()) { "akkoma" -> AKKOMA "fedibird" -> FEDIBIRD + "firefish" -> FIREFISH "friendica" -> FRIENDICA "gotosocial" -> GOTOSOCIAL "hometown" -> HOMETOWN diff --git a/core/network/src/test/kotlin/app/pachli/core/network/ServerTest.kt b/core/network/src/test/kotlin/app/pachli/core/network/ServerTest.kt index 09a0874e7..4c24a9562 100644 --- a/core/network/src/test/kotlin/app/pachli/core/network/ServerTest.kt +++ b/core/network/src/test/kotlin/app/pachli/core/network/ServerTest.kt @@ -18,6 +18,7 @@ package app.pachli.core.network import app.pachli.core.network.ServerKind.AKKOMA +import app.pachli.core.network.ServerKind.FIREFISH import app.pachli.core.network.ServerKind.FRIENDICA import app.pachli.core.network.ServerKind.GOTOSOCIAL import app.pachli.core.network.ServerKind.MASTODON @@ -234,7 +235,7 @@ class ServerTest( ), Ok( Server( - kind = UNKNOWN, + kind = FIREFISH, version = "1.1.0-dev29-hf1".toVersion(), capabilities = mapOf( ORG_JOINMASTODON_FILTERS_SERVER to "1.0.0".toVersion(), diff --git a/core/network/src/test/resources/server-versions.json5 b/core/network/src/test/resources/server-versions.json5 index 426c1d34b..894204326 100644 --- a/core/network/src/test/resources/server-versions.json5 +++ b/core/network/src/test/resources/server-versions.json5 @@ -50,6 +50,7 @@ "3.10.4-0-gebfb617", "3.10.4-1-ga4c15863-no-fetch-with-local-limit-3-10-4", "3.10.4-1-gebfb617b", + "3.10.4-2-g5d8ea16c-zkb", "3.10.4-2-gde9afa1f-tailswish", "3.10.4-3-g8660dcae", "3.10.4-4-g74f94627-suyaplace", @@ -147,7 +148,7 @@ "0.2.5" ], "bridgy-fed": [ - "20240123t140632" + "20240124t123009" ], "brutalinks": [ "master-8e7ebec1" @@ -162,7 +163,7 @@ "13.2.0-beta6", "13.2.0-beta9h", "13.2.0-dev17", - "14.0.0-d10+38d8bd", + "14.0.0-d10+21c5f1", "14.0.0-rc", "14.0.0-rc3" ], @@ -188,7 +189,8 @@ "4.6.0", "4.6.0+cs-7a02ecb", "4.6.0-beta.6", - "4.6.0-beta.7" + "4.6.0-beta.7", + "4.7.0-beta.1" ], "citizen4": [ "0.6.1" @@ -222,7 +224,6 @@ "0.7.10.0-p663da1ef", "0.7.12.0-p09a425cb", "0.7.13.0-pc2a991fe", - "0.7.14.0", "0.7.14.0-p4ca68a71", "0.7.15.0", "0.7.15.0-p1d098282", @@ -247,14 +248,16 @@ "0.7.5.0-p42ceb8b3", "0.7.99.0", "1.0.0-dev-p0a545c70", + "1.0.0-dev-p15b5b365", "1.0.0-dev-p3030c1a8", "1.0.0-dev-p389b1870", - "1.0.0-dev-p3c8d75d6", + "1.0.0-dev-p3f936815", "1.0.0-dev-p5af17a0f", "1.0.0-dev-p744f5449", "1.0.0-dev-p94c751b0", "1.0.0-dev-pa3df4d76", - "1.0.0-dev-pd45930a1", + "1.0.0-dev-pae3b7804", + "1.0.0-dev-pb9dca98b", "1.0.0-dev-pde3b1804" ], "ditto": [ @@ -306,7 +309,6 @@ "0.6.1" ], "firefish": [ - "+neko:240104.2", "1.0.0", "1.0.1", "1.0.3", @@ -345,6 +347,8 @@ "1.0.5-rc+neko:240120.83", "1.0.5-rc+neko:240120.ea", "1.0.5-rc+neko:240123.1f", + "1.0.5-rc+neko:240125.3f", + "1.0.5-rc+neko:240125.d8", "1.0.5-rc-choco", "1.0.5-rc-shrimpkey1.0.2", "1.0.5-rc.eepy", @@ -410,7 +414,6 @@ "2024.03-dev-1545", "2024.03-dev-1546", "2024.03-dev-1547", - "2024.03-dev-1548", "3.5.2-1227" ], "funkwhale": [ @@ -461,6 +464,7 @@ "1.8.0" ], "gitea": [ + "1.17.4", "1.20.4", "1.20.6", "1.21.0", @@ -510,11 +514,12 @@ "0.13.1", "0.13.1 git-ccecf5a", "0.13.1-SNAPSHOT git-138cbe4", - "0.13.1-SNAPSHOT git-238cc19", "0.13.1-SNAPSHOT git-33dbd3a", + "0.13.1-SNAPSHOT git-3c66c30", "0.13.1-SNAPSHOT git-67e11a1", "0.13.1-SNAPSHOT git-9607b48", "0.13.1-SNAPSHOT git-97a1fd9", + "0.13.1-SNAPSHOT git-b128a92", "0.13.1-SNAPSHOT git-b2cacd6", "0.13.1-SNAPSHOT git-dfc7656", "0.13.2-SNAPSHOT-pkv git-a78ee34", @@ -550,6 +555,7 @@ "v0.13.0 git-42a6310", "v0.13.0 git-68f7e35", "v0.13.0 git-9607b48", + "v0.13.0 git-b128a92", "v0.13.0 git-dfc7656", "v0.13.0 git-ebf550b", "v0.13.0 git-f4fcffc", @@ -594,7 +600,7 @@ "4.0.6+hometown-1.1.1", "4.1.0rc1+hometown-1.1.1", "4.2.3", - "4.2.3+queergroup" + "4.2.4+queergroup" ], "honk": [ "0.10.2-0", @@ -625,6 +631,7 @@ "8.0", "8.2", "8.4.2", + "8.6.1", "8.6.2", "8.6.3", "8.8.1", @@ -747,7 +754,8 @@ "0.8.0-pre" ], "lycheebridge": [ - "2024.1.1" + "2024.1.1", + "2024.2.0-alpha.0" ], "magnetar": [ "14.0.0-alpha+magnetar-0.2.0" @@ -850,8 +858,9 @@ "4.1.11", "4.1.11+stolat", "4.1.11+yufushiro", - "4.1.11-3-woof", "4.1.11-cw0", + "4.1.12", + "4.1.12-woof", "4.1.2", "4.1.2+glitch", "4.1.2+glitch+closedsocial", @@ -934,14 +943,11 @@ "4.2.1-smore.patch.2", "4.2.2", "4.2.2+asonix-changes", - "4.2.2-stable+ff1", "4.2.3", "4.2.3+-kurry-2.0", "4.2.3+-sif1.3", "4.2.3+alphatown", "4.2.3+doesstuffsocial-mods", - "4.2.3+ff1", - "4.2.3+fosspride", "4.2.3+magincia", "4.2.3+mscdn", "4.2.3+occm.web1", @@ -952,16 +958,18 @@ "4.2.3-nightly.2023-12-26", "4.2.3-notalive", "4.2.3-plusminus.1", - "4.2.3-plusminus.2", "4.2.3-slis", - "4.2.3-stable+ff1", "4.2.3-stable+ts1", "4.2.3-theatlsocial-20240114", "4.2.3-undefined+undefined", "4.2.3_ef67daisuki_club", "4.2.4", + "4.2.4+ff2", + "4.2.4+fosspride", + "4.2.4+litera.tools", + "4.2.4-plusminus.1", + "4.2.4-stable+ff2", "4.3.0-alpha.0", - "4.3.0-alpha.0+0d54f37f-ruby-3.3.0", "4.3.0-alpha.0+97ce0cc061dd0d14372b5e80ebd6d387c34e7aad", "4.3.0-alpha.0+YRYRi", "4.3.0-alpha.0+akkodon", @@ -971,31 +979,35 @@ "4.3.0-alpha.0+chuckya", "4.3.0-alpha.0+chuckya.main-d96fd9f28", "4.3.0-alpha.0+dimension", + "4.3.0-alpha.0+e05f927c-ruby-3.3.0", "4.3.0-alpha.0+farlands", "4.3.0-alpha.0+foxsay+2024-01-18", "4.3.0-alpha.0+glitch", "4.3.0-alpha.0+glitch+cat+1.0.11+nya-1.2.2", "4.3.0-alpha.0+glitch+cat+1.0.12", "4.3.0-alpha.0+glitch+pegelinux", - "4.3.0-alpha.0+glitch.0104_dfbf960", "4.3.0-alpha.0+glitch.0113_e76b7eb", "4.3.0-alpha.0+glitch.0120_915cd36", - "4.3.0-alpha.0+glitch.0121_915cd36", "4.3.0-alpha.0+glitch.0122_915cd36", + "4.3.0-alpha.0+glitch.0123_915cd36", + "4.3.0-alpha.0+glitch.0124_634acd0", + "4.3.0-alpha.0+glitch.0125_634acd0", "4.3.0-alpha.0+glitch.1116_7e5d007", "4.3.0-alpha.0+glitch.1121_769ab0c", "4.3.0-alpha.0+glitch.1122_a21fe86", "4.3.0-alpha.0+glitch.1211_98f5042", + "4.3.0-alpha.0+glitch.cortex", "4.3.0-alpha.0+glitch.cs.usocial", "4.3.0-alpha.0+glitch.donphan.social", "4.3.0-alpha.0+glitch.polyam", + "4.3.0-alpha.0+glitch.pounce", "4.3.0-alpha.0+glitch.th", - "4.3.0-alpha.0+io", "4.3.0-alpha.0+jordemort", "4.3.0-alpha.0+maud", "4.3.0-alpha.0+mementomods-2024-01-14 + Mastodon Bird UI 2.0.0rc", "4.3.0-alpha.0+nnn", - "4.3.0-alpha.0+pr-28119-9934dd1", + "4.3.0-alpha.0+pr-28119", + "4.3.0-alpha.0+pr-28119-7cf1356", "4.3.0-alpha.0+pr-28693-384ec56", "4.3.0-alpha.0+pr-28823+arbolitoloco", "4.3.0-alpha.0+qdon.glitch", @@ -1004,7 +1016,7 @@ "4.3.0-alpha.0+tontoelquelolea", "4.3.0-alpha.0+vegan", "4.3.0-alpha.0+~b612+glitch", - "4.3.0-alpha.0.12+glitch+COTS", + "4.3.0-alpha.0.13+glitch+COTS", "4.3.0-bark+prod", "4.3.0-nightly.2023-10-05", "4.3.0-nightly.2023-10-11+glitch", @@ -1019,8 +1031,8 @@ "4.3.0-nightly.2023-12-08+glitch", "4.3.0-nightly.2023-12-13+glitch", "4.3.0-nightly.2023-12-18+glitch", + "4.3.0-nightly.2023-12-20+glitch", "4.3.0-nightly.2023-12-21+glitch", - "4.3.0-nightly.2023-12-27+glitch", "4.3.0-nightly.2023-12-29+chuckya", "4.3.0-nightly.2023-12-29+glitch", "4.3.0-nightly.2023-12-30+glitch", @@ -1040,14 +1052,12 @@ "4.3.0-nightly.2024-01-17+glitch", "4.3.0-nightly.2024-01-18+glitch", "4.3.0-nightly.2024-01-19+chuckya", - "4.3.0-nightly.2024-01-19+glitch", - "4.3.0-nightly.2024-01-20", "4.3.0-nightly.2024-01-20+glitch", "4.3.0-nightly.2024-01-21", - "4.3.0-nightly.2024-01-21+glitch", - "4.3.0-nightly.2024-01-22", - "4.3.0-nightly.2024-01-22+glitch", + "4.3.0-nightly.2024-01-23", "4.3.0-nightly.2024-01-23+glitch", + "4.3.0-nightly.2024-01-24", + "4.3.0-nightly.2024-01-24+glitch", "4.3.0-rc2+glitch", "4.3.0-sharlayan.dev-1ab28", "4.3.3-alpha.0", @@ -1079,6 +1089,7 @@ "2.0.0+dfe7f0db", "2.0.0+e986ee08", "2.0.0+f5cddb31", + "2.0.0+febd8c3d", "2.0.0+ynh1", "Microblog.pub 669fec0", "Microblog.pub de607e9e3946+" @@ -1148,6 +1159,7 @@ "2023.10.1-estampie", "2023.10.2", "2023.10.2-kakunpc.0", + "2023.10.2-summersweet.1", "2023.11.0", "2023.11.0+reo2248", "2023.11.0-7", @@ -1172,24 +1184,24 @@ "2023.12.0-mame.1", "2023.12.0-square.1", "2023.12.1", - "2023.12.1+munochi", "2023.12.1-cbrx5", "2023.12.2", "2023.12.2+2", "2023.12.2+24011923", "2023.12.2+bscone.c", "2023.12.2+cremebrul_ee.1", + "2023.12.2+munochi", "2023.12.2+pbzweihander.0", "2023.12.2+serafuku", "2023.12.2+tirr.1", "2023.12.2+yurigarden.0", - "2023.12.2-1", + "2023.12.2-41kg", "2023.12.2-Hoshisaki-r1", "2023.12.2-NJ-1.3.3", "2023.12.2-Wayaskey-2023.11.0", "2023.12.2-akatsukey-v2.0.3", "2023.12.2-bsk-4.0.13", - "2023.12.2-bsk-5.0.8", + "2023.12.2-bsk-5.0.9", "2023.12.2-dev-art+1.0", "2023.12.2-dream1.10.0", "2023.12.2-drg-1.0.1", @@ -1206,10 +1218,8 @@ "2023.12.2-na2na-v2", "2023.12.2-neko", "2023.12.2-nyaaapp.1", - "2023.12.2-p1.15", "2023.12.2-pie-3.1.6", "2023.12.2-poskey-9d9955a", - "2023.12.2-psr.6.1.6", "2023.12.2-resonite-love.1", "2023.12.2.mogeko.1", "2023.12.2.papi.dev.2.hotfix.3", @@ -1221,16 +1231,21 @@ "2023.9.3-1", "2023.9.3-kids", "2023.9.3-sn231125", - "2024.1.0+date:1.21+00:35", "2024.1.0-dev.2-miyaco.18", - "2024.1.0-io", - "2024.2.0-beta.2", + "2024.1.0-io.1c", "2024.2.0-beta.3", "2024.2.0-beta.3-kaseiski", "2024.2.0-beta.4", - "2024.2.0-beta.4-PrisMisskey.1", "2024.2.0-beta.4-WKH0.1", - "2024.2.0-beta.4.papi" + "2024.2.0-beta.4-psr.6.2.0", + "2024.2.0-beta.4.papi", + "2024.2.0-beta.6", + "2024.2.0-beta.6+01.24-16:55", + "2024.2.0-beta.6-2024.01.24.4-4553d64", + "2024.2.0-beta.6-PrisMisskey.1", + "2024.2.0-beta.7", + "2024.2.0-beta.7-p1.1", + "2024.2.0-beta.7-pie-3.1.8" ], "mitra": [ "1.12.0", @@ -1338,7 +1353,7 @@ "20230721-nightly", "20230906-nightly", "20231208-nightly", - "20240123-nightly", + "20240124-nightly", "dev", "v0.1.0" ], @@ -1471,7 +1486,6 @@ "2.4.53-845-g8042e0eb-develop", "2.4.53-855-gda0ef154-develop", "2.4.53-863-g9f708037", - "2.4.53-888-g3d1828f4-develop", "2.4.53-9-g75fee846.develop+soapbox", "2.4.53-904-gbb63f72c-develop", "2.4.53-906-gf40ccce7-develop", @@ -1486,7 +1500,6 @@ "2.5.2-1-g513bd12b", "2.5.2-13-g2d193861", "2.5.2-7-g2f259166-release-2-5-2", - "2.5.2-makepkg", "2.5.3", "2.5.4", "2.5.5", @@ -1494,13 +1507,10 @@ "2.5.5-0-g255cf67-xxx", "2.5.5-1123-gf966abe4", "2.5.5-52-gf966abe4", - "2.5.50-10-g51b45132-develop", "2.5.50-149-g5576f7d1-develop", "2.5.50-190-g4c0ab884.develop+soapbox", - "2.5.50-194-g9af0657e.develop+soapbox", "2.5.50-2286-g4c0ab884.develop+soapbox", "2.5.50-2288-g648773c0.develop+soapbox", - "2.5.50-4-g2bc69111-develop", "2.5.50-46-g19933a06-develop", "2.5.50-48-g8a0162cd-develop", "2.5.50-885-g2c0fb7aa-main", @@ -1515,6 +1525,7 @@ "2.5.51-299-g6e34df89.develop+soapbox", "2.5.51-305-g6112d45a.develop+soapbox", "2.5.51-316-gd9316c48.develop+soapbox", + "2.5.51-436-ge8928e22.develop+soapbox", "2.5.52-226-g93ad16cc", "2.5.52-235-g589301ce", "2.5.52-235-g589301ce-develop", @@ -1545,6 +1556,7 @@ "2.5.54-412-ge3ea311c-develop", "2.5.54-594-gb094e92c.develop+soapbox", "2.5.54-596-gbf50f18e.develop+soapbox", + "2.5.54-603-g95261979+soapbox", "2.5.54-603-g95261979.develop+soapbox", "2.5.54-614-g95261979.develop+soapbox", "2.5.54-622-g9db714fe.develop+soapbox", @@ -1635,6 +1647,7 @@ "2.6.51-451-g548434f8", "2.6.51-455-gd802e65c-develop", "2.6.51-457-gf7b3681e", + "2.6.51-478-g626c2296-develop", "2.6.51-482-geae99b13-bikeshed-webpush", "2.6.51-505-g9aa3ba55-shitposterclub", "2.6.51-9311-g0aff56e3-neckbeard", @@ -1711,14 +1724,13 @@ "2023.11.2", "2023.11.2.beta1", "2023.12.0", - "2023.12.0.beta1", "2023.9.1.beta1", "2024.1.0.beta1", "2024.1.0.beta1.custard5", "2024.1.0.beta2", "2024.1.0.beta2.eepy8", - "2024.1.0.beta2.kopper8", - "2024.2.0-beta1" + "2024.2.0-beta1", + "2024.2.0-beta1+kopper1" ], "shuttlecraft": [ "0.0.1" @@ -1742,11 +1754,11 @@ "2.42", "2.42-dev", "2.43", - "2.43-dev", "2.44", "2.44-dev", "2.45", - "2.45-dev" + "2.45-dev", + "2.46-dev" ], "socialhome": [ "0.18.0", @@ -1867,6 +1879,9 @@ "zap": [ "22.12.30" ], + "zeus": [ + "0.6.1" + ], "えちからどっとねっと": [ "0.6.1" ],