Fix firefish instances not being detected

This commit is contained in:
Shadowfacts 2023-07-22 10:43:52 -07:00
parent 3109aafd20
commit 3d232d81ba
2 changed files with 6 additions and 6 deletions

View File

@ -72,7 +72,7 @@ public class InstanceFeatures: ObservableObject {
public var probablySupportsMarkdown: Bool {
switch instanceType {
case .pleroma(_), .mastodon(.glitch, _), .mastodon(.hometown(_), _), .calckey(_):
case .pleroma(_), .mastodon(.glitch, _), .mastodon(.hometown(_), _), .firefish(_):
return true
default:
return false
@ -195,8 +195,8 @@ public class InstanceFeatures: ObservableObject {
instanceType = .pixelfed
} else if nodeInfo?.software.name == "gotosocial" {
instanceType = .gotosocial
} else if ver.contains("calckey") {
instanceType = .calckey(nodeInfo?.software.version)
} else if ver.contains("firefish") || ver.contains("calckey") {
instanceType = .firefish(nodeInfo?.software.version)
} else {
instanceType = .mastodon(.vanilla, Version(string: ver))
}
@ -235,7 +235,7 @@ extension InstanceFeatures {
case pleroma(PleromaType)
case pixelfed
case gotosocial
case calckey(String?)
case firefish(String?)
var isMastodon: Bool {
if case .mastodon(_, _) = self {

View File

@ -153,8 +153,8 @@ private func captureError(_ error: Client.Error, in mastodonController: Mastodon
event.tags!["instance_type"] = "pixelfed"
case .gotosocial:
event.tags!["instance_type"] = "gotosocial"
case .calckey(let calckeyVersion):
event.tags!["instance_type"] = "calckey"
case .firefish(let calckeyVersion):
event.tags!["instance_type"] = "firefish"
if let calckeyVersion {
event.tags!["calckey_version"] = calckeyVersion
}