Monitor relay connections for restricted responses and show error to user

This commit is contained in:
Jon Staab
2025-09-03 15:29:57 -07:00
parent 4001e877b4
commit 95698813c6
9 changed files with 226 additions and 75 deletions
+5 -6
View File
@@ -1,10 +1,12 @@
<script module lang="ts">
import {goto} from "$app/navigation"
import {dissoc} from "@welshman/lib"
import {ROOM_META} from "@welshman/util"
import {load} from "@welshman/net"
import {pushToast} from "@app/util/toast"
import {makeSpacePath} from "@app/util/routes"
import {addSpaceMembership, broadcastUserData} from "@app/core/commands"
import {pushToast} from "@app/util/toast"
import {relaysMostlyRestricted} from "@app/core/state"
export const confirmSpaceJoin = async (url: string) => {
await addSpaceMembership(url)
@@ -19,12 +21,9 @@
}
broadcastUserData([url])
goto(path, {replaceState: true})
pushToast({
message: "Welcome to the space!",
})
relaysMostlyRestricted.update(dissoc(url))
pushToast({message: "Welcome to the space!"})
}
</script>