Stop using deprecated methods, fields & exports (#12524)
* Remove legacy `threepidCreds` field Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Remove `user` field legacy UIA fallback Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Update imports Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Fix test Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --------- Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
bec8fdb3d3
commit
113c365563
12 changed files with 13 additions and 45 deletions
|
@ -15,7 +15,8 @@ limitations under the License.
|
|||
*/
|
||||
|
||||
import { mocked } from "jest-mock";
|
||||
import { IEncryptedFile, UploadOpts, MatrixClient } from "matrix-js-sdk/src/matrix";
|
||||
import { UploadOpts, MatrixClient } from "matrix-js-sdk/src/matrix";
|
||||
import { EncryptedFile } from "matrix-js-sdk/src/types";
|
||||
|
||||
import { createVoiceMessageRecording, VoiceMessageRecording } from "../../src/audio/VoiceMessageRecording";
|
||||
import { RecordingState, VoiceRecording } from "../../src/audio/VoiceRecording";
|
||||
|
@ -122,7 +123,7 @@ describe("VoiceMessageRecording", () => {
|
|||
|
||||
describe("when the first data has been received", () => {
|
||||
const uploadUrl = "https://example.com/content123";
|
||||
const encryptedFile = {} as unknown as IEncryptedFile;
|
||||
const encryptedFile = {} as unknown as EncryptedFile;
|
||||
|
||||
beforeEach(() => {
|
||||
voiceRecording.onDataAvailable!(testBuf);
|
||||
|
@ -158,7 +159,7 @@ describe("VoiceMessageRecording", () => {
|
|||
roomId: string,
|
||||
file: File | Blob,
|
||||
_progressHandler?: UploadOpts["progressHandler"],
|
||||
): Promise<{ url?: string; file?: IEncryptedFile }> => {
|
||||
): Promise<{ url?: string; file?: EncryptedFile }> => {
|
||||
uploadFileClient = matrixClient;
|
||||
uploadFileRoomId = roomId;
|
||||
uploadBlob = file;
|
||||
|
|
|
@ -302,10 +302,6 @@ describe("<ForgotPassword>", () => {
|
|||
client_secret: expect.any(String),
|
||||
sid: testSid,
|
||||
},
|
||||
threepidCreds: {
|
||||
client_secret: expect.any(String),
|
||||
sid: testSid,
|
||||
},
|
||||
},
|
||||
testPassword,
|
||||
false,
|
||||
|
@ -334,10 +330,6 @@ describe("<ForgotPassword>", () => {
|
|||
client_secret: expect.any(String),
|
||||
sid: testSid,
|
||||
},
|
||||
threepidCreds: {
|
||||
client_secret: expect.any(String),
|
||||
sid: testSid,
|
||||
},
|
||||
},
|
||||
testPassword,
|
||||
false,
|
||||
|
@ -430,10 +422,6 @@ describe("<ForgotPassword>", () => {
|
|||
client_secret: expect.any(String),
|
||||
sid: testSid,
|
||||
},
|
||||
threepidCreds: {
|
||||
client_secret: expect.any(String),
|
||||
sid: testSid,
|
||||
},
|
||||
},
|
||||
testPassword,
|
||||
true,
|
||||
|
|
|
@ -1048,7 +1048,6 @@ describe("<SessionManagerTab />", () => {
|
|||
},
|
||||
password: "",
|
||||
type: "m.login.password",
|
||||
user: aliceId,
|
||||
});
|
||||
// devices refreshed
|
||||
expect(mockClient.getDevices).toHaveBeenCalled();
|
||||
|
|
|
@ -641,7 +641,6 @@ export function mkStubRoom(
|
|||
roomId,
|
||||
setBlacklistUnverifiedDevices: jest.fn(),
|
||||
setUnreadNotificationCount: jest.fn(),
|
||||
shouldUpgradeToVersion: (() => null) as () => string | null,
|
||||
tags: {},
|
||||
timeline: [],
|
||||
} as unknown as Room;
|
||||
|
|
|
@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
|||
limitations under the License.
|
||||
*/
|
||||
|
||||
import { IEncryptedFile } from "matrix-js-sdk/src/matrix";
|
||||
import { EncryptedFile } from "matrix-js-sdk/src/types";
|
||||
|
||||
import { createVoiceMessageContent } from "../../src/utils/createVoiceMessageContent";
|
||||
|
||||
|
@ -26,7 +26,7 @@ describe("createVoiceMessageContent", () => {
|
|||
"ogg/opus",
|
||||
23000,
|
||||
42000,
|
||||
{} as unknown as IEncryptedFile,
|
||||
{} as unknown as EncryptedFile,
|
||||
[1, 2, 3],
|
||||
),
|
||||
).toMatchSnapshot();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue