use negentropy sync

This commit is contained in:
2026-08-05 10:08:01 +07:00
parent fdf74327bb
commit 2ec7d14c33
4 changed files with 151 additions and 10 deletions
+10 -4
View File
@@ -78,14 +78,20 @@ impl RepoStore {
&self.addr
}
/// Subscribe the relay pool to this repository's activity.
/// Fetch this repository's events from the bootstrap relays (one-shot,
/// auto-closing subscription).
fn subscribe_remote(&mut self, cx: &mut Context<Self>) {
let addr = self.addr.clone();
Backend::global(cx).update(cx, |backend, cx| {
backend.subscribe(filters::announcement(&addr), cx);
backend.subscribe(filters::state(&addr), cx);
backend.subscribe(filters::activity(&addr), cx);
backend.subscribe_bootstrap(
vec![
filters::announcement(&addr),
filters::state(&addr),
filters::activity(&addr),
],
cx,
);
});
}