From 46fbcc0a4c8a8dbf6cd345d6eaa6fe33a82100bb Mon Sep 17 00:00:00 2001 From: DanConwayDev Date: Wed, 21 Jan 2026 13:28:37 +0000 Subject: feat: add archive-grasp-services configuration option Enables relay operators to backup/archive specific GRASP servers by domain. Includes configuration, validation, documentation, and integration tests. --- src/nostr/events.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/nostr') diff --git a/src/nostr/events.rs b/src/nostr/events.rs index 1d5a50f..718633e 100644 --- a/src/nostr/events.rs +++ b/src/nostr/events.rs @@ -436,6 +436,17 @@ pub fn validate_announcement( return AnnouncementResult::AcceptArchive; } + // GRASP-05: Archive mode - accept if announcement lists any configured GRASP service in clone URLs + // Only check clone URLs (not relays) since we're archiving from OTHER services + // Check if announcement matches any configured GRASP service domains + if archive_config + .grasp_services + .iter() + .any(|service| announcement.has_clone_url(service)) + { + return AnnouncementResult::AcceptArchive; + } + // Reject with appropriate error message if archive_config.read_only { AnnouncementResult::Reject(format!( -- cgit v1.2.3