diff options
| author | DanConwayDev <DanConwayDev@protonmail.com> | 2026-02-18 17:12:17 +0000 |
|---|---|---|
| committer | DanConwayDev <DanConwayDev@protonmail.com> | 2026-02-18 17:12:17 +0000 |
| commit | d76003b629a4a03dba23a8a1c41da6e4ac4c30cf (patch) | |
| tree | 38412fdeed3e7996923603fe1964db4e5ce94bdc /src/git/handlers.rs | |
| parent | 806936e7d1aab5dfd0c2ad6b98a115122dc1785c (diff) | |
feat: upgrade repo to Full sync and trigger PR event subscription after announcement promotion
When git data arrives for a purgatory announcement and promotes it to the
database, the relay now:
1. Upgrades the announcement's sync level in RepoSyncIndex from StateOnly
to Full (git/sync.rs: process_purgatory_announcements)
2. Sends AddFilters actions to SyncManager for all connected relays, using
Full sync filters (Layer 2 #a/#A/#q) to subscribe to PR events
(purgatory/sync/context.rs: RealSyncContext.process_newly_available_git_data)
3. For user-submitted purgatory announcements, registers the repo in
RepoSyncIndex with StateOnly level and sends AddFilters to SyncManager
so it discovers and connects to relays listed in the announcement tags
(nostr/builder.rs: handle_announcement AcceptPurgatory path)
The RealSyncContext now accepts optional repo_sync_index and sync_action_tx
parameters. main.rs wires these up from SyncManager. PolicyContext gains
repo_sync_index and sync_action_tx fields for the write policy path.
Diffstat (limited to 'src/git/handlers.rs')
| -rw-r--r-- | src/git/handlers.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/git/handlers.rs b/src/git/handlers.rs index 017eee4..129ca2c 100644 --- a/src/git/handlers.rs +++ b/src/git/handlers.rs | |||
| @@ -307,6 +307,7 @@ pub async fn handle_receive_pack( | |||
| 307 | Some(&relay), | 307 | Some(&relay), |
| 308 | &purgatory, | 308 | &purgatory, |
| 309 | git_data_path_buf, | 309 | git_data_path_buf, |
| 310 | None, | ||
| 310 | ) | 311 | ) |
| 311 | .await | 312 | .await |
| 312 | { | 313 | { |