From 15d834dc0f3727e6e2f050ef1a43e8148ecb71e6 Mon Sep 17 00:00:00 2001 From: Awiteb Date: Tue, 27 May 2025 08:45:20 +0000 Subject: [PATCH] chore: Deduplicate tags Signed-off-by: Awiteb --- src/cli/commands/issue/new.rs | 1 + src/cli/commands/reply.rs | 2 +- src/cli/commands/repo/announce.rs | 1 + src/nostr_utils/traits.rs | 1 + 4 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/cli/commands/issue/new.rs b/src/cli/commands/issue/new.rs index 850ec19..7405c65 100644 --- a/src/cli/commands/issue/new.rs +++ b/src/cli/commands/issue/new.rs @@ -138,6 +138,7 @@ impl CommandRunner for NewArgs { subject, self.label, )? + .dedup_tags() .pow(options.pow) .tags(content_details.into_tags()) // p-tag the reset of the reposotoies owners diff --git a/src/cli/commands/reply.rs b/src/cli/commands/reply.rs index 258a51f..adee903 100644 --- a/src/cli/commands/reply.rs +++ b/src/cli/commands/reply.rs @@ -192,9 +192,9 @@ impl CommandRunner for ReplyArgs { root.as_ref(), repos.first().and_then(|r| r.relays.first()).cloned(), ) + .dedup_tags() .pow(options.pow) .tags(content_details.into_tags()) - .tag(Tag::public_key(reply_to.pubkey)) .build(user_pubk); let event_id = event.id.expect("There is an id"); diff --git a/src/cli/commands/repo/announce.rs b/src/cli/commands/repo/announce.rs index b20eea5..2789c57 100644 --- a/src/cli/commands/repo/announce.rs +++ b/src/cli/commands/repo/announce.rs @@ -115,6 +115,7 @@ impl CommandRunner for AnnounceArgs { self.label.into_iter().map(utils::str_trim).collect(), self.force_id, )? + .dedup_tags() .pow(options.pow) .build(user_pubk); diff --git a/src/nostr_utils/traits.rs b/src/nostr_utils/traits.rs index ac04455..04789f5 100644 --- a/src/nostr_utils/traits.rs +++ b/src/nostr_utils/traits.rs @@ -102,6 +102,7 @@ impl EventBuilder { euc: None, maintainers, })? + .dedup_tags() .tags(labels.into_iter().map(Tag::hashtag)), ) }