Skip to content

Commit

Permalink
feat: generic reposts
Browse files Browse the repository at this point in the history
  • Loading branch information
verbiricha committed Jun 17, 2023
1 parent 2d6324a commit 026b678
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/components/Reposts.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,14 @@ export default function Reposts({ event, reposts }) {
const relay = seenOn.at(0);
const tag = relay ? [...ref, relay] : ref;
const p = ["p", event.pubkey];
const k = ["k", String(event.kind)];

try {
const ev = {
kind: REPOST,
created_at: dateToUnix(),
tags: [tag, p, ...evTags],
content: JSON.stringify(rawEvent),
tags: [tag, p, k],
content: "",
};
const signed = new NDKEvent(ndk, ev);
await signed.sign();
Expand Down
2 changes: 1 addition & 1 deletion src/const.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Nostr
export const NOTE = 1;
export const CONTACTS = 3;
export const REPOST = 6;
export const REPOST = 16;
export const REACTION = 7;
export const ZAP = 9735;
export const ZAP_REQUEST = 9734;
Expand Down

0 comments on commit 026b678

Please sign in to comment.