This commit is contained in:
2026-09-05 15:27:35 +07:00
parent 1f3afea81b
commit 7ff09502b9
8 changed files with 314 additions and 182 deletions
-7
View File
@@ -94,13 +94,6 @@ pub fn comments_for(roots: impl IntoIterator<Item = EventId>) -> Vec<Filter> {
]
}
/// All repositories announced by an author.
pub fn announcements_by(public_key: PublicKey) -> Filter {
Filter::new()
.kind(Kind::GitRepoAnnouncement)
.author(public_key)
}
/// All repository announcements, for global discovery.
pub fn all_announcements() -> Filter {
Filter::new().kind(Kind::GitRepoAnnouncement)
+3 -3
View File
@@ -2,7 +2,7 @@ use std::collections::HashSet;
use nostr::prelude::*;
use crate::RepoAddr;
use crate::{RepoAddr, repo_addr};
/// Parsed NIP-34 repository announcement, plain data ready for the UI.
#[derive(Debug, Clone, PartialEq, Eq)]
@@ -267,8 +267,8 @@ impl Announcement {
}
/// The repository address of this announcement.
pub fn addr(&self) -> crate::RepoAddr {
crate::repo_addr(self.owner, self.id.clone())
pub fn addr(&self) -> RepoAddr {
repo_addr(self.owner, self.id.clone())
}
/// The name of the repository, or a default if none is provided.