From 397179d550989335f906d45d80678570d8255a49 Mon Sep 17 00:00:00 2001 From: Jon Staab Date: Tue, 9 Jun 2026 16:58:17 -0700 Subject: [PATCH] Don't show recent screen when nip 29 is not enabled --- src/app/routes.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/app/routes.ts b/src/app/routes.ts index 396f9c39..04e5de78 100644 --- a/src/app/routes.ts +++ b/src/app/routes.ts @@ -6,7 +6,7 @@ import {page} from "$app/stores" import {nthEq} from "@welshman/lib" import type {TrustedEvent} from "@welshman/util" import {getAddress} from "@welshman/util" -import {tracker, userMessagingRelayList} from "@welshman/app" +import {tracker, userMessagingRelayList, getRelay} from "@welshman/app" import {identity} from "@welshman/lib" import { getTagValue, @@ -21,7 +21,7 @@ import { } from "@welshman/util" import {makeChatId} from "@app/chats" import {entityLink} from "@app/env" -import {encodeRelay} from "@app/relays" +import {encodeRelay, hasNip29} from "@app/relays" import {DM_KINDS} from "@app/content" import {ROOM} from "@app/groups" import {pushModal} from "@app/modal" @@ -84,6 +84,8 @@ export const goToSpace = async (url: string) => { if (prevPath && prevPath !== makeSpacePath(url)) { goto(prevPath, {replaceState: true}) + } else if (!hasNip29(getRelay(url))) { + goto(makeSpaceChatPath(url), {replaceState: true}) } else if (window.matchMedia(`(min-width: ${theme.screens.md})`).matches) { goto(makeSpacePath(url, "recent"), {replaceState: true}) } else {