Infer room/protected tag from parent event in reactions and deletes

This commit is contained in:
Jon Staab
2024-12-16 13:33:34 -08:00
parent cd8d8b548f
commit fe789c461d
7 changed files with 44 additions and 40 deletions
+2 -3
View File
@@ -8,7 +8,6 @@
import NoteCard from "@app/components/NoteCard.svelte"
import ReactionSummary from "@app/components/ReactionSummary.svelte"
import {publishDelete, publishReaction} from "@app/commands"
import {PROTECTED} from "@app/state"
export let url
export let event
@@ -19,12 +18,12 @@
if (reaction) {
publishDelete({relays: [url], event: reaction})
} else {
publishReaction({event, content, tags: [PROTECTED], relays: [url]})
publishReaction({event, content, relays: [url]})
}
}
const onEmoji = (emoji: NativeEmoji) =>
publishReaction({event, content: emoji.unicode, tags: [PROTECTED], relays: [url]})
publishReaction({event, content: emoji.unicode, relays: [url]})
</script>
<NoteCard {event} class="card2 bg-alt">