From 7222d530dd4adeed268c1a1a90f320bd386f0eb3 Mon Sep 17 00:00:00 2001 From: Thomas Ricouard Date: Mon, 1 Jan 2024 09:23:06 +0100 Subject: [PATCH] Fix url router --- Packages/Env/Sources/Env/Router.swift | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Packages/Env/Sources/Env/Router.swift b/Packages/Env/Sources/Env/Router.swift index d9023930..d87d9395 100644 --- a/Packages/Env/Sources/Env/Router.swift +++ b/Packages/Env/Sources/Env/Router.swift @@ -140,7 +140,9 @@ public enum SheetDestination: Identifiable { { navigate(to: .hashTag(tag: tag, account: nil)) return .handled - } else if url.lastPathComponent.first == "@", let host = url.host { + } else if url.lastPathComponent.first == "@", + let host = url.host, + !host.hasPrefix("www") { let acct = "\(url.lastPathComponent)@\(host)" Task { await navigateToAccountFrom(acct: acct, url: url)