add emoji reactions

This commit is contained in:
Alejandro Gomez
2023-01-06 23:10:18 +01:00
parent 1c6176a397
commit e2b9b2223f
2 changed files with 30 additions and 5 deletions

View File

@ -83,10 +83,10 @@ export default function useEventPublisher() {
}
return await signEvent(ev);
},
like: async (evRef) => {
like: async (evRef, content = "+") => {
let ev = Event.ForPubKey(pubKey);
ev.Kind = EventKind.Reaction;
ev.Content = "+";
ev.Content = content;
ev.Tags.push(new Tag(["e", evRef.Id], 0));
ev.Tags.push(new Tag(["p", evRef.PubKey], 1));
return await signEvent(ev);