upleb.uk

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

summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/git/sync.rs8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/git/sync.rs b/src/git/sync.rs
index 13f30b6..a0b7c47 100644
--- a/src/git/sync.rs
+++ b/src/git/sync.rs
@@ -37,7 +37,8 @@ use tracing::{debug, info, warn};
37use nostr_sdk::Event; 37use nostr_sdk::Event;
38 38
39use crate::git::authorization::{ 39use crate::git::authorization::{
40 collect_authorized_maintainers, fetch_repository_data, RepositoryData, 40 collect_authorized_maintainers, fetch_repository_data, fetch_repository_data_with_purgatory,
41 RepositoryData,
41}; 42};
42use crate::git::{self, oid_exists}; 43use crate::git::{self, oid_exists};
43use crate::nostr::builder::SharedDatabase; 44use crate::nostr::builder::SharedDatabase;
@@ -923,7 +924,10 @@ async fn process_purgatory_state_events(
923 ); 924 );
924 925
925 // Fetch repository data once for all state events 926 // Fetch repository data once for all state events
926 let mut db_repo_data = match fetch_repository_data(database, identifier).await { 927 // IMPORTANT: Use fetch_repository_data_with_purgatory to include announcements
928 // that may still be in purgatory (not yet promoted). This ensures authorization
929 // works correctly even if the announcement promotion happens in the same batch.
930 let mut db_repo_data = match fetch_repository_data_with_purgatory(database, purgatory, identifier).await {
927 Ok(data) => data, 931 Ok(data) => data,
928 Err(e) => { 932 Err(e) => {
929 warn!( 933 warn!(