fix: ensure content is empty when reposting replaceable events
This commit is contained in:
parent
a40d7b0676
commit
ce72098175
1 changed files with 4 additions and 2 deletions
|
|
@ -128,13 +128,15 @@ export function createRepostDraftEvent(event: Event): TDraftEvent {
|
|||
}
|
||||
|
||||
tags.push(buildKTag(event.kind))
|
||||
if (isReplaceableEvent(event.kind)) {
|
||||
|
||||
const isReplaceable = isReplaceableEvent(event.kind)
|
||||
if (isReplaceable) {
|
||||
tags.push(buildATag(event))
|
||||
}
|
||||
|
||||
return {
|
||||
kind: kinds.GenericRepost,
|
||||
content: isProtected ? '' : JSON.stringify(event),
|
||||
content: isProtected || isReplaceable ? '' : JSON.stringify(event),
|
||||
tags,
|
||||
created_at: dayjs().unix()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue