fix: ensure content is empty when reposting replaceable events

This commit is contained in:
codytseng 2025-11-20 21:16:42 +08:00
parent a40d7b0676
commit ce72098175

View file

@ -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()
}