diff options
Diffstat (limited to 'src/nostr')
| -rw-r--r-- | src/nostr/events.rs | 11 |
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!( |