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
+5 -1
View File
@@ -13,6 +13,7 @@
import {pushToast} from "@app/toast"
import {PROTECTED} from "@app/state"
import {makeEditor} from "@app/editor"
import {canEnforceNip70} from "@app/commands"
const {url} = $props()
@@ -47,9 +48,12 @@
["summary", summary],
["amount", String(amount)],
["relays", url],
PROTECTED,
]
if (await canEnforceNip70(url)) {
tags.push(PROTECTED)
}
publishThunk({
relays: [url],
event: makeEvent(ZAP_GOAL, {content, tags}),