add root marker by default in channels

This commit is contained in:
Don 2024-02-15 21:01:06 +09:00
parent 8879641511
commit e3172ee013

View File

@ -39,7 +39,7 @@ export default function ChannelMessageForm({
let draft: DraftNostrEvent = {
kind: kinds.ChannelMessage,
content: values.content,
tags: [["e", channel.id]],
tags: [["e", rootId || channel.id, "", "root"]],
created_at: dayjs().unix(),
};
@ -47,10 +47,6 @@ export default function ChannelMessageForm({
draft = createEmojiTags(draft, emojis);
draft = ensureNotifyPubkeys(draft, contentMentions);
if (rootId) {
draft.tags.push(["e", rootId, "", "root"]);
}
setLoadingMessage("Signing...");
await publish("Send DM", draft, undefined, false);
reset();