Merge branch 'develop' into dbkr/stateafter
This commit is contained in:
@@ -162,6 +162,7 @@ export const mockClientMethodsCrypto = (): Partial<
|
||||
getVersion: jest.fn().mockReturnValue("Version 0"),
|
||||
getOwnDeviceKeys: jest.fn().mockReturnValue(new Promise(() => {})),
|
||||
getCrossSigningKeyId: jest.fn(),
|
||||
isEncryptionEnabledInRoom: jest.fn().mockResolvedValue(false),
|
||||
}),
|
||||
});
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ import {
|
||||
M_POLL_RESPONSE,
|
||||
M_TEXT,
|
||||
} from "matrix-js-sdk/src/matrix";
|
||||
import { uuid4 } from "@sentry/utils";
|
||||
import { randomString } from "matrix-js-sdk/src/randomstring";
|
||||
|
||||
import { flushPromises } from "./utilities";
|
||||
|
||||
@@ -67,7 +67,7 @@ export const makePollEndEvent = (
|
||||
id?: string,
|
||||
): MatrixEvent => {
|
||||
return new MatrixEvent({
|
||||
event_id: id || uuid4(),
|
||||
event_id: id || randomString(16),
|
||||
room_id: roomId,
|
||||
origin_server_ts: ts,
|
||||
type: M_POLL_END.name,
|
||||
@@ -91,7 +91,7 @@ export const makePollResponseEvent = (
|
||||
ts = 0,
|
||||
): MatrixEvent =>
|
||||
new MatrixEvent({
|
||||
event_id: uuid4(),
|
||||
event_id: randomString(16),
|
||||
room_id: roomId,
|
||||
origin_server_ts: ts,
|
||||
type: M_POLL_RESPONSE.name,
|
||||
|
||||
@@ -131,6 +131,10 @@ export function createTestClient(): MatrixClient {
|
||||
createRecoveryKeyFromPassphrase: jest.fn().mockResolvedValue({}),
|
||||
bootstrapSecretStorage: jest.fn(),
|
||||
isDehydrationSupported: jest.fn().mockResolvedValue(false),
|
||||
restoreKeyBackup: jest.fn(),
|
||||
restoreKeyBackupWithPassphrase: jest.fn(),
|
||||
loadSessionBackupPrivateKeyFromSecretStorage: jest.fn(),
|
||||
storeSessionBackupPrivateKey: jest.fn(),
|
||||
}),
|
||||
|
||||
getPushActionsForEvent: jest.fn(),
|
||||
@@ -275,6 +279,7 @@ export function createTestClient(): MatrixClient {
|
||||
sendStickerMessage: jest.fn(),
|
||||
getLocalAliases: jest.fn().mockReturnValue([]),
|
||||
uploadDeviceSigningKeys: jest.fn(),
|
||||
isKeyBackupKeyStored: jest.fn().mockResolvedValue(null),
|
||||
} as unknown as MatrixClient;
|
||||
|
||||
client.reEmitter = new ReEmitter(client);
|
||||
|
||||
Reference in New Issue
Block a user