upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/src/nostr/events.rs
diff options
context:
space:
mode:
authorDanConwayDev <DanConwayDev@protonmail.com>2026-01-21 13:28:37 +0000
committerDanConwayDev <DanConwayDev@protonmail.com>2026-01-21 13:38:11 +0000
commit46fbcc0a4c8a8dbf6cd345d6eaa6fe33a82100bb (patch)
tree6ab52486732077dbab80907d974c195b1e2f7216 /src/nostr/events.rs
parent780d09b0c1eb823f02fc61de6dbf99b2d5cefaca (diff)
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.
Diffstat (limited to 'src/nostr/events.rs')
-rw-r--r--src/nostr/events.rs11
1 files changed, 11 insertions, 0 deletions
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(
436 return AnnouncementResult::AcceptArchive; 436 return AnnouncementResult::AcceptArchive;
437 } 437 }
438 438
439 // GRASP-05: Archive mode - accept if announcement lists any configured GRASP service in clone URLs
440 // Only check clone URLs (not relays) since we're archiving from OTHER services
441 // Check if announcement matches any configured GRASP service domains
442 if archive_config
443 .grasp_services
444 .iter()
445 .any(|service| announcement.has_clone_url(service))
446 {
447 return AnnouncementResult::AcceptArchive;
448 }
449
439 // Reject with appropriate error message 450 // Reject with appropriate error message
440 if archive_config.read_only { 451 if archive_config.read_only {
441 AnnouncementResult::Reject(format!( 452 AnnouncementResult::Reject(format!(