diff options
| author | DanConwayDev <DanConwayDev@protonmail.com> | 2026-02-12 14:02:22 +0000 |
|---|---|---|
| committer | DanConwayDev <DanConwayDev@protonmail.com> | 2026-02-12 14:50:53 +0000 |
| commit | 8fc4078d60f0ccf16318fe7fa765fcdd3627fe1f (patch) | |
| tree | b8af6ea023d2fbdd400a18d90a8d7ffe1bee4d57 /src/nostr/events.rs | |
| parent | 71b6157044f305c8d7142b24bd71798035603f0e (diff) | |
chore: fix clippy warnings
- Derive Default for config structs instead of manual impl
- Fix doc comment formatting in ArchiveConfig::matches
- Collapse nested if statement in validate_announcement
- Allow too_many_arguments for SyncManager::new
Diffstat (limited to 'src/nostr/events.rs')
| -rw-r--r-- | src/nostr/events.rs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/nostr/events.rs b/src/nostr/events.rs index 718633e..b9784f7 100644 --- a/src/nostr/events.rs +++ b/src/nostr/events.rs | |||
| @@ -419,14 +419,14 @@ pub fn validate_announcement( | |||
| 419 | // GRASP-01: Normal mode - accept if announcement lists our service AND matches repository whitelist (if enabled) | 419 | // GRASP-01: Normal mode - accept if announcement lists our service AND matches repository whitelist (if enabled) |
| 420 | if lists_service && !archive_config.read_only { | 420 | if lists_service && !archive_config.read_only { |
| 421 | // Check repository whitelist if enabled | 421 | // Check repository whitelist if enabled |
| 422 | if repository_config.enabled() { | 422 | if repository_config.enabled() |
| 423 | if !repository_config.matches(&npub, &announcement.identifier) { | 423 | && !repository_config.matches(&npub, &announcement.identifier) |
| 424 | return AnnouncementResult::Reject(format!( | 424 | { |
| 425 | "Announcement lists service but does not match repository whitelist. \ | 425 | return AnnouncementResult::Reject(format!( |
| 426 | "Announcement lists service but does not match repository whitelist. \ | ||
| 426 | Repository {}/{} not in whitelist", | 427 | Repository {}/{} not in whitelist", |
| 427 | npub, announcement.identifier | 428 | npub, announcement.identifier |
| 428 | )); | 429 | )); |
| 429 | } | ||
| 430 | } | 430 | } |
| 431 | return AnnouncementResult::Accept; | 431 | return AnnouncementResult::Accept; |
| 432 | } | 432 | } |