about summary refs log tree commit diff
path: root/src/lib
diff options
context:
space:
mode:
authorHailey <me@haileyok.com>2024-03-06 11:34:48 -0800
committerGitHub <noreply@github.com>2024-03-06 11:34:48 -0800
commit4e6020b88cdba8334ee97ea14f8fc7d782f1998a (patch)
treea18e6821e7acdeb62bb0fac412166eedff448351 /src/lib
parent2d9a5db967c7eb98228ae372c1139e4069974b90 (diff)
downloadvoidsky-4e6020b88cdba8334ee97ea14f8fc7d782f1998a.tar.zst
fix internal links showing up as external (#3128)
* fix internal links showing up as external

* fix internal links showing up as external
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/strings/url-helpers.ts7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/lib/strings/url-helpers.ts b/src/lib/strings/url-helpers.ts
index ba2cdb39b..ee88225ee 100644
--- a/src/lib/strings/url-helpers.ts
+++ b/src/lib/strings/url-helpers.ts
@@ -158,7 +158,12 @@ export function linkRequiresWarning(uri: string, label: string) {
   const host = urip.hostname.toLowerCase()
 
   // Hosts that end with bsky.app or bsky.social should be trusted by default.
-  if (host.endsWith('bsky.app') || host.endsWith('bsky.social')) {
+  if (
+    uri.startsWith('/') ||
+    host.endsWith('bsky.app') ||
+    host.endsWith('bsky.social') ||
+    host.endsWith('blueskyweb.xyz')
+  ) {
     // if this is a link to internal content,
     // warn if it represents itself as a URL to another app
     return !!labelDomain && labelDomain !== host && isPossiblyAUrl(labelDomain)