mirror of
https://github.com/mastodon/mastodon-ios.git
synced 2025-01-23 22:11:22 +01:00
fix(Mention): Fixes an issue where user Profiles are not found because matching is not done via href (#895)
This commit is contained in:
parent
3ec9e603df
commit
c0cd51c0d4
@ -66,15 +66,19 @@ extension DataSourceFacade {
|
|||||||
) async {
|
) async {
|
||||||
let domain = provider.authContext.mastodonAuthenticationBox.domain
|
let domain = provider.authContext.mastodonAuthenticationBox.domain
|
||||||
|
|
||||||
let href = userInfo?["href"] as? String
|
guard
|
||||||
guard let url = href.flatMap({ URL(string: $0) }) else { return }
|
let href = userInfo?["href"] as? String,
|
||||||
|
let url = URL(string: href)
|
||||||
|
else {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
let managedObjectContext = provider.context.managedObjectContext
|
let managedObjectContext = provider.context.managedObjectContext
|
||||||
let mentions = try? await managedObjectContext.perform {
|
let mentions = try? await managedObjectContext.perform {
|
||||||
return status.object(in: managedObjectContext)?.mentions ?? []
|
return status.object(in: managedObjectContext)?.mentions ?? []
|
||||||
}
|
}
|
||||||
|
|
||||||
guard let mention = mentions?.first(where: { $0.username == mention }) else {
|
guard let mention = mentions?.first(where: { $0.url == href }) else {
|
||||||
_ = await provider.coordinator.present(
|
_ = await provider.coordinator.present(
|
||||||
scene: .safari(url: url),
|
scene: .safari(url: url),
|
||||||
from: provider,
|
from: provider,
|
||||||
|
Loading…
Reference in New Issue
Block a user