mirror of
https://github.com/SableClient/Sable.git
synced 2026-11-25 19:41:17 -08:00
add join rules to request data
This commit is contained in:
1 parent
67cb91546f
commit
9b2fa13ac1
2 files changed
+4
-2
No files matched your search
@@ -4,7 +4,7 @@
|
||||
|
||||
import { describe, it, expect, vi, beforeEach } from 'vitest';
|
||||
import type { MatrixClient, MSC3575List } from '$types/matrix-sdk';
|
||||
import { SlidingSyncEvent, SlidingSyncState } from '$types/matrix-sdk';
|
||||
import { EventType, SlidingSyncEvent, SlidingSyncState } from '$types/matrix-sdk';
|
||||
|
||||
import { SlidingSyncManager } from './slidingSync';
|
||||
|
||||
@@ -85,7 +85,8 @@ describe('SlidingSyncManager initial request', () => {
|
||||
const joined = lists.get('joined');
|
||||
|
||||
expect(joined?.ranges).toEqual([[0, 29]]);
|
||||
expect(joined?.required_state).toHaveLength(8);
|
||||
expect(joined?.required_state).toHaveLength(9);
|
||||
expect(joined?.required_state).toContainEqual([EventType.RoomJoinRules, '']);
|
||||
expect(joined?.required_state).not.toContainEqual(['m.image_pack', '*']);
|
||||
});
|
||||
|
||||
|
||||
@@ -77,6 +77,7 @@ const buildListRequiredState = (): MSC3575RoomSubscription['required_state'] =>
|
||||
[EventType.RoomCreate, ''],
|
||||
[EventType.RoomName, ''],
|
||||
[EventType.RoomCanonicalAlias, ''],
|
||||
[EventType.RoomJoinRules, ''],
|
||||
[EventType.RoomMember, MSC3575_STATE_KEY_ME],
|
||||
['m.space.child', MSC3575_WILDCARD],
|
||||
];
|
||||
|
||||
Reference in new issue
Block a user