Revert "fix: Backwards compatibility on file upload (#5663)"

This reverts commit 7c448222e1.
This commit is contained in:
Diego Mello 2024-04-29 10:30:33 -03:00
parent 77d32f4747
commit 9115e3a057
2 changed files with 2 additions and 7 deletions

View File

@ -29,7 +29,6 @@ import {
E2E_STATUS
} from '../constants';
import { Services } from '../services';
import { compareServerVersion } from '../methods/helpers';
class Encryption {
ready: boolean;
@ -468,8 +467,7 @@ class Encryption {
const roomE2E = await this.getRoomInstance(rid);
const { version: serverVersion } = store.getState().server;
if ('path' in message && compareServerVersion(serverVersion, 'greaterThanOrEqualTo', '6.8.0')) {
if ('path' in message) {
return roomE2E.encryptUpload(message);
}
return roomE2E.encrypt(message);

View File

@ -12,8 +12,6 @@ import FileUpload from './helpers/fileUpload';
import { IFileUpload } from './helpers/fileUpload/interfaces';
import log from './helpers/log';
import { E2E_MESSAGE_TYPE } from '../constants';
import { store } from '../store/auxStore';
import { compareServerVersion } from './helpers';
const uploadQueue: { [index: string]: StatefulPromise<FetchBlobResponse> } = {};
@ -120,8 +118,7 @@ export function sendFileMessage(
});
}
const { version: serverVersion } = store.getState().server;
if (encryptedFileInfo.t === E2E_MESSAGE_TYPE && compareServerVersion(serverVersion, 'greaterThanOrEqualTo', '6.8.0')) {
if (encryptedFileInfo.t === E2E_MESSAGE_TYPE) {
formData.push({
name: 't',
data: encryptedFileInfo.t