mirror of
https://github.com/ipnet-mesh/meshcore-hub.git
synced 2026-06-26 13:01:55 +02:00
888e193e09
The observed_by filter on messages, advertisements, telemetry, and trace_paths matched only the first observer (stored in observer_node_id), silently excluding events whose secondary observers appear only in the event_observers junction table. This caused filtered lists to appear 'several hours behind' when a dominant observer consistently won the first-insert race for recent events. Replace the ObserverNode.public_key predicate with an IN subquery against the event_observers junction table (the canonical multi-observer source already used for display). Add a shared observed_by_filter_clause() helper in observer_utils.py to avoid duplication across all four routes. Add regression tests proving a secondary observer (present only in event_observers) sees events via the filter. Update existing fixtures and inline test data to seed event_hash and EventObserver rows. Fixes #239