diff options
Diffstat (limited to 'src/nostr/builder.rs')
| -rw-r--r-- | src/nostr/builder.rs | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/nostr/builder.rs b/src/nostr/builder.rs index 34014db..aff12a6 100644 --- a/src/nostr/builder.rs +++ b/src/nostr/builder.rs | |||
| @@ -138,6 +138,29 @@ impl Nip34WritePolicy { | |||
| 138 | } | 138 | } |
| 139 | } | 139 | } |
| 140 | } | 140 | } |
| 141 | AnnouncementResult::AcceptPurgatory => { | ||
| 142 | // New announcement - add to purgatory | ||
| 143 | match self.announcement_policy.add_to_purgatory(event) { | ||
| 144 | Ok(()) => { | ||
| 145 | tracing::info!( | ||
| 146 | "Accepted announcement to purgatory: {} (waiting for git data)", | ||
| 147 | event_id_str | ||
| 148 | ); | ||
| 149 | WritePolicyResult::Reject { | ||
| 150 | status: true, // Client sees OK | ||
| 151 | message: "purgatory: won't be served until git data arrives".into(), | ||
| 152 | } | ||
| 153 | } | ||
| 154 | Err(e) => { | ||
| 155 | tracing::warn!( | ||
| 156 | "Failed to add announcement to purgatory {}: {}", | ||
| 157 | event_id_str, | ||
| 158 | e | ||
| 159 | ); | ||
| 160 | WritePolicyResult::reject(e) | ||
| 161 | } | ||
| 162 | } | ||
| 163 | } | ||
| 141 | AnnouncementResult::AcceptMaintainer => { | 164 | AnnouncementResult::AcceptMaintainer => { |
| 142 | // Parse announcement to get details for logging | 165 | // Parse announcement to get details for logging |
| 143 | match RepositoryAnnouncement::from_event(event.clone()) { | 166 | match RepositoryAnnouncement::from_event(event.clone()) { |