Fix firefish instances not being detected
This commit is contained in:
parent
3109aafd20
commit
3d232d81ba
|
@ -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 {
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue