Skip to content

Commit

Permalink
Merge remote-tracking branch 'refs/remotes/origin/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
chmac committed Aug 9, 2024
2 parents 69ff6f5 + 103dbe8 commit a899259
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion validation/repost.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,15 @@ function generateRepostedEvent(originalEvent: Event, privateKey: Uint8Array) {
const dTag = ["d", `${originalEvent.pubkey}:${originalEvent.id}`];
const eTag = ["e", originalEvent.id];
const pTag = ["p", originalEvent.pubkey];
const originalCreatedAtTag = [
"original_created_at",
`${originalEvent.created_at}`,
];

const eventTemplate: EventTemplate = {
kind: MAP_NOTE_REPOST_KIND,
created_at: Math.floor(Date.now() / 1000),
tags: [eTag, pTag, dTag, ...derivedTags],
tags: [eTag, pTag, dTag, originalCreatedAtTag, ...derivedTags],
content: derivedContent,
};
const signedEvent = finalizeEvent(eventTemplate, privateKey);
Expand Down

0 comments on commit a899259

Please sign in to comment.