Replace MatrixClient.isRoomEncrypted
by MatrixClient.CryptoApi.isEncryptionEnabledInRoom
in ContentMessages.ts
(#28238)
This commit is contained in:
parent
4e93233a3d
commit
fad457362d
3 changed files with 17 additions and 21 deletions
|
@ -337,7 +337,7 @@ export async function uploadFile(
|
|||
const abortController = controller ?? new AbortController();
|
||||
|
||||
// If the room is encrypted then encrypt the file before uploading it.
|
||||
if (matrixClient.isRoomEncrypted(roomId)) {
|
||||
if (await matrixClient.getCrypto()?.isEncryptionEnabledInRoom(roomId)) {
|
||||
// First read the file into memory.
|
||||
const data = await readFileAsArrayBuffer(file);
|
||||
if (abortController.signal.aborted) throw new UploadCanceledError();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue