diff options
| author | DanConwayDev <DanConwayDev@protonmail.com> | 2026-01-26 17:20:11 +0000 |
|---|---|---|
| committer | DanConwayDev <DanConwayDev@protonmail.com> | 2026-01-27 20:38:16 +0000 |
| commit | 905ebd838a9ff8cc777cf3b3b6306066e8c177fc (patch) | |
| tree | 1c46ddded3b1fff935dfa80b44aeff862e624642 /docs/tutorials/README.md | |
| parent | 1ae97cd85aec95f6270f853b28e48774cefc6bf6 (diff) | |
fix: load existing events from database on startup with two-pass queries
Previously, SelfSubscriber only saw events returned by the WebSocket
subscription to the local relay, which has limits on the number of
events returned. This caused repos with announcements in the database
to never get Layer 2/3 filters created, resulting in missing state events.
Now, on startup, we query the database directly with two separate queries:
1. Query announcements (30617) to populate repo_sync_index
2. Query root events (1617/1618/1621) to create Layer 3 filters
Both queries use .since(last_connected) if available for incremental
loading on reconnect.
Filters are created inline and made mutable to support the .since()
clause, rather than using a shared create_event_filter() method.
Fixes the issue where state events were missing for repos like cashbird
and creative-space that had announcements in the database but weren't
returned by the WebSocket subscription.
Diffstat (limited to 'docs/tutorials/README.md')
0 files changed, 0 insertions, 0 deletions