From f1facea929be240ae261b1383f24d8daf6ec66a3 Mon Sep 17 00:00:00 2001 From: Shadowfacts Date: Thu, 26 Jan 2023 21:15:02 -0500 Subject: [PATCH] Fix status URLs with fragments not being resolved --- .../Screens/Conversation/ConversationViewController.swift | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Tusker/Screens/Conversation/ConversationViewController.swift b/Tusker/Screens/Conversation/ConversationViewController.swift index ee6135fb..167b6e7a 100644 --- a/Tusker/Screens/Conversation/ConversationViewController.swift +++ b/Tusker/Screens/Conversation/ConversationViewController.swift @@ -189,11 +189,11 @@ class ConversationViewController: UIViewController { indicator.startAnimating() state = .loading(indicator) - let url = WebURL(url)! - let request = Client.search(query: url.serialized(), types: [.statuses], resolve: true) + let url = WebURL(url)!.serialized(excludingFragment: true) + let request = Client.search(query: url, types: [.statuses], resolve: true) do { let (results, _) = try await mastodonController.run(request) - guard let status = results.statuses.first(where: { $0.url == url }) else { + guard let status = results.statuses.first(where: { $0.url?.serialized() == url }) else { throw UnableToResolveError() } _ = mastodonController.persistentContainer.addOrUpdateOnViewContext(status: status)