Revert "prevent errors with corrupt files"

This reverts commit 3f48f26327.
This commit is contained in:
marlon-erler
2024-07-22 01:05:19 +02:00
parent 3f48f26327
commit cf048ff4e0
4 changed files with 34 additions and 58 deletions
+2 -12
View File
@@ -444,7 +444,6 @@
handleStringifiedFile = (stringifiedFile) => {
const file = parseValidObject(stringifiedFile);
if (file == null) return;
this.storeFile(file);
};
// methods
addFile = (file) => {
@@ -462,8 +461,6 @@
file,
fileContentName
);
const existingFileContent = this.storageModel.read(fileContentPath);
if (existingFileContent != null) return;
const stringifiedContent = stringify(fileContent);
this.storageModel.write(fileContentPath, stringifiedContent);
};
@@ -503,13 +500,6 @@
const filePath = _FileModel.getFilePath(file.id);
return [...filePath, fileContentName];
};
static createFile = () => {
return {
dataVersion: DATA_VERSION,
id: v4_default(),
contentVersions: []
};
};
};
// src/Model/Utility/crypto.ts
@@ -767,7 +757,7 @@
// utility
static generateChatInfo = (primaryChannel) => {
return {
dataVersion: DATA_VERSION,
dataVersion: "v2",
primaryChannel,
secondaryChannels: [],
encryptionKey: "",
@@ -776,7 +766,7 @@
};
static createChatMessage = async (channel, sender, encryptionKey, body, file) => {
const chatMessage = {
dataVersion: DATA_VERSION,
dataVersion: "v2",
id: v4_default(),
channel,
sender,