-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Labels
Description
Describe the bug
When the same event is received from multiple relays (during query or broadcast), only the first occurrence is emitted and the sources field is not updated to reflect all relays that have the event. This results in incomplete relay hints when encoding events to NIP-19 (nevent) and makes it difficult to know which relays actually have the event.
Expected behavior
The sources field should contain all relay URLs from which the event was received. When an event is received from multiple relays, the sources should be merged instead of ignoring subsequent occurrences.
Additional context
This affects multiple parts of the codebase:
- StreamResponseCleaner (
stream_response_cleaner.dart): Deduplicates by event ID but ignores subsequent occurrences completely instead of merging sources. - _paginatedQuery (
requests.dart): Same issue withseenEventIds- duplicates are ignored, sources not merged. - Broadcast operations: When an event is successfully broadcast to multiple relays, the event object is never updated with the relay URLs that accepted it.
Impact:
- NIP-19 relay hints are incomplete when encoding events
- Pagination may be affected if relying on sources to track queried relays
- Difficult to debug which relays have a given event
Reactions are currently unavailable