Detect nip29 support for create room button

This commit is contained in:
Jon Staab
2025-05-27 16:22:20 -07:00
parent 4ba6c72459
commit e57b5721f6
5 changed files with 67 additions and 40 deletions
+7 -4
View File
@@ -18,6 +18,7 @@
import RoomCreate from "@app/components/RoomCreate.svelte"
import RelayDescription from "@app/components/RelayDescription.svelte"
import {
hasNip29,
decodeRelay,
channelIsLocked,
makeChannelId,
@@ -183,10 +184,12 @@
</div>
</Link>
{/each}
<Button onclick={addRoom} class="btn btn-neutral whitespace-nowrap">
<Icon icon="add-circle" />
Create
</Button>
{#if hasNip29($relay)}
<Button onclick={addRoom} class="btn btn-neutral whitespace-nowrap">
<Icon icon="add-circle" />
Create
</Button>
{/if}
</div>
{#if pubkey}
<Divider>Recent posts from the relay admin</Divider>