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()
|
indicator.startAnimating()
|
||||||
state = .loading(indicator)
|
state = .loading(indicator)
|
||||||
|
|
||||||
let url = WebURL(url)!
|
let url = WebURL(url)!.serialized(excludingFragment: true)
|
||||||
let request = Client.search(query: url.serialized(), types: [.statuses], resolve: true)
|
let request = Client.search(query: url, types: [.statuses], resolve: true)
|
||||||
do {
|
do {
|
||||||
let (results, _) = try await mastodonController.run(request)
|
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()
|
throw UnableToResolveError()
|
||||||
}
|
}
|
||||||
_ = mastodonController.persistentContainer.addOrUpdateOnViewContext(status: status)
|
_ = mastodonController.persistentContainer.addOrUpdateOnViewContext(status: status)
|
||||||
|
|
Loading…
Reference in New Issue