diff --git a/src/app/commands.ts b/src/app/commands.ts
index ed9f772..2d63b63 100644
--- a/src/app/commands.ts
+++ b/src/app/commands.ts
@@ -65,7 +65,7 @@ import {
loadMembership,
loadSettings,
getDefaultPubkeys,
- getMembershipUrls,
+ userRoomsByUrl,
} from "@app/state"
// Utils
@@ -301,7 +301,7 @@ export const setRelayPolicy = (url: string, read: boolean, write: boolean) => {
url,
...INDEXER_RELAYS,
...ctx.app.router.FromUser().getUrls(),
- ...getMembershipUrls(userMembership.get()),
+ ...userRoomsByUrl.get().keys(),
],
})
}
@@ -322,7 +322,7 @@ export const setInboxRelayPolicy = (url: string, enabled: boolean) => {
relays: [
...INDEXER_RELAYS,
...ctx.app.router.FromUser().getUrls(),
- ...getMembershipUrls(userMembership.get()),
+ ...userRoomsByUrl.get().keys(),
],
})
}
diff --git a/src/app/components/MenuSpace.svelte b/src/app/components/MenuSpace.svelte
index 4cc26d4..f8503d3 100644
--- a/src/app/components/MenuSpace.svelte
+++ b/src/app/components/MenuSpace.svelte
@@ -15,9 +15,8 @@
import RoomCreate from "@app/components/RoomCreate.svelte"
import MenuSpaceRoomItem from "@app/components/MenuSpaceRoomItem.svelte"
import {
- getMembershipUrls,
+ userRoomsByUrl,
hasMembershipUrl,
- userMembership,
memberships,
deriveUserRooms,
deriveOtherRooms,
@@ -93,7 +92,7 @@
- {#if getMembershipUrls($userMembership).includes(url)}
+ {#if $userRoomsByUrl.has(url)}