Skip to content

Add E2E test: sync filter behavior with not_senders#12

Merged
ThomasHalwax merged 1 commit intomainfrom
test/sync-filter-behavior
Mar 20, 2026
Merged

Add E2E test: sync filter behavior with not_senders#12
ThomasHalwax merged 1 commit intomainfrom
test/sync-filter-behavior

Conversation

@axel-krapotke
Copy link
Copy Markdown
Contributor

Documents how Tuwunel handles /sync when not_senders filters the joining user's own events.

Findings

Scenario Room in rooms.join Timeline events State events
No filter 1 (own join) 8
not_senders=[self] 0 7
not_senders=[self] + rooms=[id] 0 7

Key insight: The room always appears in rooms.join with state events, even when not_senders filters the user's own join from the timeline. The stateEvents check added in #11 can detect room appearance in this scenario — provided the sync long-poll includes the room in its filter at the time of the join.

Documents how Tuwunel handles /sync when not_senders filters the
joining user's own events:

- Room DOES appear in rooms.join
- Timeline: empty (own join event filtered by not_senders)
- State: present (7 events from other users)
- limited: true, prev_batch: present

Tested with three variants:
1. No filter (baseline)
2. not_senders=[self]
3. not_senders=[self] + rooms=[roomId]

All three show the room in rooms.join. The state block reliably
contains events regardless of not_senders.
@ThomasHalwax ThomasHalwax merged commit 48e7978 into main Mar 20, 2026
@ThomasHalwax ThomasHalwax deleted the test/sync-filter-behavior branch March 20, 2026 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants