diff --git a/src/app/access.ts b/src/app/access.ts index 70029585..578478e2 100644 --- a/src/app/access.ts +++ b/src/app/access.ts @@ -22,7 +22,7 @@ import {PLATFORM_URL} from "@app/env" import {relaysMostlyRestricted} from "@app/policies" import {Push} from "@app/push" import {deriveSocket} from "@app/relays" -import {notificationSettings, setSpaceNotifications} from "@app/settings" +import {notificationSettings, removeTrustedRelay, setSpaceNotifications} from "@app/settings" import {syncApplicationData} from "@app/sync" export const ROOM_CREATE_INVITE = 9009 @@ -149,6 +149,12 @@ export const leaveRoom = async (url: string, h: string) => { await roomLists.get().removeRoom(h, url).then(publish) } +export const leaveSpace = async (url: string) => { + await roomLists.get().removeRelay(url).then(publish) + await publishLeaveRequest(url) + await removeTrustedRelay(url) +} + export const publishRoomInvite = async (url: string, h: string) => { const code = randomId() const event = makeEvent(ROOM_CREATE_INVITE, { diff --git a/src/app/components/SpaceAuthError.svelte b/src/app/components/SpaceAuthError.svelte index d6ac1fa2..153772e5 100644 --- a/src/app/components/SpaceAuthError.svelte +++ b/src/app/components/SpaceAuthError.svelte @@ -1,7 +1,6 @@