Fix status URLs with fragments not being resolved
This commit is contained in:
parent
d638ea054b
commit
f1facea929
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue