Stop publishing join requests every time we open a space

This commit is contained in:
Jon Staab
2026-05-05 09:09:28 -07:00
parent 89f5d8cdf5
commit 341c1b45b2
+3 -18
View File
@@ -73,7 +73,6 @@ import {
waitForThunkError,
getPubkeyRelays,
userBlossomServerList,
getThunkError,
addRoomMember,
manageRelay,
getRelay,
@@ -264,16 +263,12 @@ export const attemptRelayAccess = async (url: string, claim = "") => {
return stripPrefix(error)
}
export const deriveRelayAuthError = (url: string, claim = "") => {
// Kick off the auth process
export const deriveRelayAuthError = (url: string) => {
Pool.get().get(url).auth.attemptAuth(sign)
// Attempt to join the relay
const thunk = publishJoinRequest({url, claim})
return derived(
[thunk, relaysMostlyRestricted, deriveSocket(url)],
([$thunk, $relaysMostlyRestricted, $socket]) => {
[relaysMostlyRestricted, deriveSocket(url)],
([$relaysMostlyRestricted, $socket]) => {
if ($socket.auth.status === AuthStatus.Forbidden && $socket.auth.details) {
return stripPrefix($socket.auth.details)
}
@@ -281,16 +276,6 @@ export const deriveRelayAuthError = (url: string, claim = "") => {
if ($relaysMostlyRestricted[url]) {
return stripPrefix($relaysMostlyRestricted[url])
}
const error = getThunkError($thunk)
if (error) {
const isEmptyInvite = !claim && error.includes("invite code")
if (!shouldIgnoreError(error) && !isEmptyInvite) {
return stripPrefix(error) || "join request rejected"
}
}
},
)
}