forked from coracle/flotilla
Only protect events if the relay will authenticate with the user
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
import ModalHeader from "@lib/components/ModalHeader.svelte"
|
||||
import Button from "@lib/components/Button.svelte"
|
||||
import Profile from "@app/components/Profile.svelte"
|
||||
import {publishDelete} from "@app/commands"
|
||||
import {publishDelete, canEnforceNip70} from "@app/commands"
|
||||
|
||||
const {url, event} = $props()
|
||||
|
||||
@@ -16,8 +16,8 @@
|
||||
|
||||
const back = () => history.back()
|
||||
|
||||
const deleteReport = (report: TrustedEvent) => {
|
||||
publishDelete({event: report, relays: [url]})
|
||||
const deleteReport = async (report: TrustedEvent) => {
|
||||
publishDelete({event: report, relays: [url], protect: await canEnforceNip70(url)})
|
||||
|
||||
if ($reports.length === 0) {
|
||||
history.back()
|
||||
|
||||
Reference in New Issue
Block a user