Fix invite-specific join errors not being shown (#32621)
* Fix invite-specific join errors not being shown * remove horrible non-jest function of getAccountData * Use an Error * Always dispatch an Error * Throw a UserFriendlyError
This commit is contained in:
@@ -688,7 +688,6 @@ export function mkStubRoom(
|
||||
fetchRoomThreads: jest.fn().mockReturnValue(Promise.resolve()),
|
||||
findEventById: jest.fn().mockReturnValue(undefined),
|
||||
findPredecessor: jest.fn().mockReturnValue({ roomId: "", eventId: null }),
|
||||
getAccountData: (_: EventType | string) => undefined as MatrixEvent | undefined,
|
||||
getAltAliases: jest.fn().mockReturnValue([]),
|
||||
getAvatarUrl: () => "mxc://avatar.url/room.png",
|
||||
getCanonicalAlias: jest.fn(),
|
||||
@@ -725,6 +724,7 @@ export function mkStubRoom(
|
||||
getRoomUnreadNotificationCount: jest.fn().mockReturnValue(0),
|
||||
getVersion: jest.fn().mockReturnValue("1"),
|
||||
getBumpStamp: jest.fn().mockReturnValue(0),
|
||||
getAccountData: jest.fn(),
|
||||
hasMembershipState: () => false,
|
||||
isElementVideoRoom: jest.fn().mockReturnValue(false),
|
||||
isSpaceRoom: jest.fn().mockReturnValue(false),
|
||||
|
||||
Reference in New Issue
Block a user