Allow users to opt-in to spaces that strip signatures

This commit is contained in:
Jon Staab
2025-09-03 09:02:54 -07:00
parent a94883089e
commit 99defc6d79
13 changed files with 281 additions and 58 deletions
+9 -1
View File
@@ -5,14 +5,16 @@
import {ago, MONTH} from "@welshman/lib"
import {ROOM_META, EVENT_TIME, THREAD, COMMENT, MESSAGE} from "@welshman/util"
import Page from "@lib/components/Page.svelte"
import Dialog from "@lib/components/Dialog.svelte"
import SecondaryNav from "@lib/components/SecondaryNav.svelte"
import MenuSpace from "@app/components/MenuSpace.svelte"
import SpaceAuthError from "@app/components/SpaceAuthError.svelte"
import SpaceTrustRelay from "@app/components/SpaceTrustRelay.svelte"
import {pushToast} from "@app/util/toast"
import {pushModal} from "@app/util/modal"
import {setChecked} from "@app/util/notifications"
import {checkRelayConnection, checkRelayAuth, checkRelayAccess} from "@app/core/commands"
import {decodeRelay, userRoomsByUrl} from "@app/core/state"
import {decodeRelay, userRoomsByUrl, relaysPendingTrust} from "@app/core/state"
import {pullConservatively} from "@app/core/requests"
import {notifications} from "@app/util/notifications"
@@ -82,3 +84,9 @@
{@render children?.()}
{/key}
</Page>
{#if $relaysPendingTrust.includes(url)}
<Dialog>
<SpaceTrustRelay {url} />
</Dialog>
{/if}
@@ -31,7 +31,7 @@
import ChannelComposeParent from "@app/components/ChannelComposeParent.svelte"
import {
userRoomsByUrl,
userSettingValues,
userSettingsValues,
decodeRelay,
getEventsForUrl,
deriveUserMembershipStatus,
@@ -128,7 +128,7 @@
const thunk = publishThunk({
relays: [url],
event: makeEvent(MESSAGE, template),
delay: $userSettingValues.send_delay,
delay: $userSettingsValues.send_delay,
})
pushToast({
+2 -2
View File
@@ -20,7 +20,7 @@
import ChannelCompose from "@app/components/ChannelCompose.svelte"
import ChannelComposeParent from "@app/components/ChannelComposeParent.svelte"
import {
userSettingValues,
userSettingsValues,
decodeRelay,
getEventsForUrl,
PROTECTED,
@@ -69,7 +69,7 @@
const thunk = publishThunk({
relays: [url],
event: makeEvent(MESSAGE, template),
delay: $userSettingValues.send_delay,
delay: $userSettingsValues.send_delay,
})
pushToast({