mirror of
https://github.com/coracle-social/coracle.git
synced 2024-09-30 00:41:12 +00:00
Fix encrypted export
This commit is contained in:
parent
2d41eb4874
commit
1b77f669c9
@ -1,5 +1,4 @@
|
||||
<script lang="ts">
|
||||
import {isGiftWrap} from "src/util/nostr"
|
||||
import FieldInline from "src/partials/FieldInline.svelte"
|
||||
import Toggle from "src/partials/Toggle.svelte"
|
||||
import Anchor from "src/partials/Anchor.svelte"
|
||||
@ -10,7 +9,7 @@
|
||||
const submit = async () => {
|
||||
const events = Array.from(repository.query([userOnly ? {authors: [$user.pubkey]} : {}]))
|
||||
const jsonl = events
|
||||
.filter(e => includeEncrypted || !isGiftWrap(e))
|
||||
.filter(e => includeEncrypted || (!e.wrap && e.kind !== 4))
|
||||
// Important: re-wrap encrypted messages
|
||||
.map(e => JSON.stringify(e.wrap || e))
|
||||
.join("\n")
|
||||
|
Loading…
Reference in New Issue
Block a user