forked from coracle/flotilla
Only protect events if the relay will authenticate with the user
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
import ChannelMessageMenuButton from "@app/components/ChannelMessageMenuButton.svelte"
|
||||
import ChannelMessageMenuMobile from "@app/components/ChannelMessageMenuMobile.svelte"
|
||||
import {colors, ENABLE_ZAPS} from "@app/state"
|
||||
import {publishDelete, publishReaction} from "@app/commands"
|
||||
import {publishDelete, publishReaction, canEnforceNip70} from "@app/commands"
|
||||
import {pushModal} from "@app/modal"
|
||||
|
||||
interface Props {
|
||||
@@ -41,10 +41,11 @@
|
||||
|
||||
const openProfile = () => pushModal(ProfileDetail, {pubkey: event.pubkey, url})
|
||||
|
||||
const deleteReaction = (event: TrustedEvent) => publishDelete({relays: [url], event})
|
||||
const deleteReaction = async (event: TrustedEvent) =>
|
||||
publishDelete({relays: [url], event, protect: await canEnforceNip70(url)})
|
||||
|
||||
const createReaction = (template: EventContent) =>
|
||||
publishReaction({...template, event, relays: [url]})
|
||||
const createReaction = async (template: EventContent) =>
|
||||
publishReaction({...template, event, relays: [url], protect: await canEnforceNip70(url)})
|
||||
</script>
|
||||
|
||||
<TapTarget
|
||||
|
||||
Reference in New Issue
Block a user