Only protect events if the relay will authenticate with the user

This commit is contained in:
Jon Staab
2025-07-30 16:30:03 -07:00
parent 03b42c8276
commit 069904f07a
23 changed files with 159 additions and 87 deletions
+2 -2
View File
@@ -1,7 +1,7 @@
<script lang="ts">
import type {TrustedEvent} from "@welshman/util"
import Confirm from "@lib/components/Confirm.svelte"
import {publishDelete} from "@app/commands"
import {publishDelete, canEnforceNip70} from "@app/commands"
import {clearModals} from "@app/modal"
type Props = {
@@ -12,7 +12,7 @@
const {url, event}: Props = $props()
const confirm = async () => {
await publishDelete({event, relays: [url]})
await publishDelete({event, relays: [url], protect: await canEnforceNip70(url)})
clearModals()
}