This commit is contained in:
2026-09-23 07:40:37 +07:00
parent 366b289bf4
commit 7ca6634d69
3 changed files with 49 additions and 33 deletions
+2 -1
View File
@@ -129,7 +129,6 @@ pub fn build_message(
build_rumor_ms(KIND_MESSAGE, author, content, tags, at_ms)
}
/// `parent` is the immediate parent; a `None` root means the parent is the thread's root.
#[allow(clippy::too_many_arguments)]
pub fn build_comment(
author: PublicKey,
@@ -146,12 +145,14 @@ pub fn build_comment(
tags.push(Tag::custom(TAG_ROOT_KIND, [root.kind.to_string()]));
tags.push(reply_tag(TAG_ROOT, &root.reply));
if let Some(root_author) = root.reply.author {
tags.push(Tag::custom(TAG_ROOT_AUTHOR, [root_author.to_hex()]));
}
tags.push(Tag::custom(TAG_TARGET_KIND, [parent.kind.to_string()]));
tags.push(reply_tag(TAG_TARGET, &parent.reply));
if let Some(parent_author) = parent.reply.author {
tags.push(Tag::custom(TAG_TARGET_AUTHOR, [parent_author.to_hex()]));
}