client tags: assume atomic/yaaic are the latest abandonware versions

--HG--
branch : nmdc-ircfrontend
This commit is contained in:
mappu 2018-03-24 15:36:41 +13:00
parent 86ad1e1633
commit 541cbaabd2
2 changed files with 18 additions and 0 deletions

View File

@ -27,6 +27,14 @@ func parseVersion(ver string) clientTag {
ret.AppName = cParts[0]
ret.Version = cParts[1]
} else if ver == "Atomic - An IRC client for Android https://indrora.github.io/Atomic" {
ret.AppName = "Atomic"
ret.Version = "2.1" // Abandonware. Last available version
} else if ver == "Yaaic - Yet Another Android IRC Client - http://www.yaaic.org" {
ret.AppName = "Yaaic"
ret.Version = "1.1" // Abandonware. Last available version
} else {
// Special cases all failed, time for heuristics

View File

@ -52,6 +52,16 @@ func TestParseVersion(t *testing.T) {
"irssi v1.0.2-1+deb9u3",
"irssi", "1.0.2",
},
[3]string{
"Atomic - An IRC client for Android https://indrora.github.io/Atomic",
"Atomic", "2.1",
},
[3]string{
"Yaaic - Yet Another Android IRC Client - http://www.yaaic.org",
"Yaaic", "1.1",
},
}
for _, test := range tests {