Revert "fix: Backwards compatibility on file upload (#5663)"
This reverts commit 7c448222e1
.
This commit is contained in:
parent
77d32f4747
commit
9115e3a057
|
@ -29,7 +29,6 @@ import {
|
||||||
E2E_STATUS
|
E2E_STATUS
|
||||||
} from '../constants';
|
} from '../constants';
|
||||||
import { Services } from '../services';
|
import { Services } from '../services';
|
||||||
import { compareServerVersion } from '../methods/helpers';
|
|
||||||
|
|
||||||
class Encryption {
|
class Encryption {
|
||||||
ready: boolean;
|
ready: boolean;
|
||||||
|
@ -468,8 +467,7 @@ class Encryption {
|
||||||
|
|
||||||
const roomE2E = await this.getRoomInstance(rid);
|
const roomE2E = await this.getRoomInstance(rid);
|
||||||
|
|
||||||
const { version: serverVersion } = store.getState().server;
|
if ('path' in message) {
|
||||||
if ('path' in message && compareServerVersion(serverVersion, 'greaterThanOrEqualTo', '6.8.0')) {
|
|
||||||
return roomE2E.encryptUpload(message);
|
return roomE2E.encryptUpload(message);
|
||||||
}
|
}
|
||||||
return roomE2E.encrypt(message);
|
return roomE2E.encrypt(message);
|
||||||
|
|
|
@ -12,8 +12,6 @@ import FileUpload from './helpers/fileUpload';
|
||||||
import { IFileUpload } from './helpers/fileUpload/interfaces';
|
import { IFileUpload } from './helpers/fileUpload/interfaces';
|
||||||
import log from './helpers/log';
|
import log from './helpers/log';
|
||||||
import { E2E_MESSAGE_TYPE } from '../constants';
|
import { E2E_MESSAGE_TYPE } from '../constants';
|
||||||
import { store } from '../store/auxStore';
|
|
||||||
import { compareServerVersion } from './helpers';
|
|
||||||
|
|
||||||
const uploadQueue: { [index: string]: StatefulPromise<FetchBlobResponse> } = {};
|
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) {
|
||||||
if (encryptedFileInfo.t === E2E_MESSAGE_TYPE && compareServerVersion(serverVersion, 'greaterThanOrEqualTo', '6.8.0')) {
|
|
||||||
formData.push({
|
formData.push({
|
||||||
name: 't',
|
name: 't',
|
||||||
data: encryptedFileInfo.t
|
data: encryptedFileInfo.t
|
||||||
|
|
Loading…
Reference in New Issue