fix share post being set as reaction

This commit is contained in:
hzrd149 2023-02-20 13:31:19 -06:00
parent c9ba9193e5
commit 128f7ea630

View File

@ -6,7 +6,7 @@ import accountService from "../services/account";
import { Kind } from "nostr-tools";
export function isReply(event: NostrEvent | DraftNostrEvent) {
return !!event.tags.find((tag) => isETag(tag) && tag[3] !== "mention");
return event.tags.filter(isETag).some((tag) => tag[3] !== "mention");
}
export function isNote(event: NostrEvent | DraftNostrEvent) {
@ -96,7 +96,7 @@ export function buildShare(event: NostrEvent): DraftNostrEvent {
tags.push(["p", event.pubkey]);
return {
kind: Kind.Reaction,
kind: Kind.Text,
// TODO: be smarter about picking relay
tags,
content: "#[0]",