You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-07-28 15:22:05 +03:00
Update the live timeline when the JS SDK resets it (#8806)
This commit is contained in:
@ -93,6 +93,7 @@ export function createTestClient(): MatrixClient {
|
||||
emit: eventEmitter.emit.bind(eventEmitter),
|
||||
isRoomEncrypted: jest.fn().mockReturnValue(false),
|
||||
peekInRoom: jest.fn().mockResolvedValue(mkStubRoom(undefined, undefined, undefined)),
|
||||
stopPeeking: jest.fn(),
|
||||
|
||||
paginateEventTimeline: jest.fn().mockResolvedValue(undefined),
|
||||
sendReadReceipt: jest.fn().mockResolvedValue(undefined),
|
||||
@ -155,6 +156,8 @@ export function createTestClient(): MatrixClient {
|
||||
setPushRuleActions: jest.fn().mockResolvedValue(undefined),
|
||||
relations: jest.fn().mockRejectedValue(undefined),
|
||||
isCryptoEnabled: jest.fn().mockReturnValue(false),
|
||||
hasLazyLoadMembersEnabled: jest.fn().mockReturnValue(false),
|
||||
isInitialSyncComplete: jest.fn().mockReturnValue(true),
|
||||
downloadKeys: jest.fn(),
|
||||
fetchRoomEvent: jest.fn(),
|
||||
} as unknown as MatrixClient;
|
||||
@ -358,7 +361,7 @@ export function mkStubRoom(roomId: string = null, name: string, client: MatrixCl
|
||||
getJoinedMemberCount: jest.fn().mockReturnValue(1),
|
||||
getMembers: jest.fn().mockReturnValue([]),
|
||||
getPendingEvents: () => [],
|
||||
getLiveTimeline: () => stubTimeline,
|
||||
getLiveTimeline: jest.fn().mockReturnValue(stubTimeline),
|
||||
getUnfilteredTimelineSet: () => null,
|
||||
findEventById: () => null,
|
||||
getAccountData: () => null,
|
||||
|
Reference in New Issue
Block a user