From 3d232d81ba933446d62ae13d6ac218511e175d90 Mon Sep 17 00:00:00 2001 From: Shadowfacts Date: Sat, 22 Jul 2023 10:43:52 -0700 Subject: [PATCH] Fix firefish instances not being detected --- .../Sources/InstanceFeatures/InstanceFeatures.swift | 8 ++++---- Tusker/Views/Toast/ToastConfiguration.swift | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Packages/InstanceFeatures/Sources/InstanceFeatures/InstanceFeatures.swift b/Packages/InstanceFeatures/Sources/InstanceFeatures/InstanceFeatures.swift index fddd0d03..c86e0266 100644 --- a/Packages/InstanceFeatures/Sources/InstanceFeatures/InstanceFeatures.swift +++ b/Packages/InstanceFeatures/Sources/InstanceFeatures/InstanceFeatures.swift @@ -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 { diff --git a/Tusker/Views/Toast/ToastConfiguration.swift b/Tusker/Views/Toast/ToastConfiguration.swift index b6a3faab..14bca56b 100644 --- a/Tusker/Views/Toast/ToastConfiguration.swift +++ b/Tusker/Views/Toast/ToastConfiguration.swift @@ -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 }