beta12 for porting old format
This commit is contained in:
Vendored
+3
-1
@@ -1751,11 +1751,12 @@
|
||||
};
|
||||
// load
|
||||
this.loadInfo = () => {
|
||||
const info = this.storageModel.readStringifiable(
|
||||
let info = this.storageModel.readStringifiable(
|
||||
this.getInfoPath(),
|
||||
ChatInfoReference
|
||||
);
|
||||
this.info = info || _ChatModel.generateChatInfo("0", "0", "standard" /* Standard */);
|
||||
this.storeInfo();
|
||||
};
|
||||
this.handleInfo = (info) => {
|
||||
this.info = info;
|
||||
@@ -1958,6 +1959,7 @@
|
||||
this.handleFileContent(fileContent);
|
||||
};
|
||||
this.handleFileContent = (fileContent) => {
|
||||
console.log(fileContent.type);
|
||||
if (fileContent.type == "chat-info") {
|
||||
if (checkMatchesObjectStructure(fileContent, ChatInfoReference) == false) return;
|
||||
this.chatModel.handleInfo(fileContent);
|
||||
|
||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
const VERSION = "2610 Beta 11"
|
||||
const VERSION = "2610 Beta 12"
|
||||
|
||||
function processUrl(event) {
|
||||
const url = event.request.url;
|
||||
|
||||
Vendored
+1
-1
@@ -1 +1 @@
|
||||
2610 Beta 11
|
||||
2610 Beta 12
|
||||
|
||||
@@ -285,11 +285,12 @@ export default class ChatModel {
|
||||
|
||||
// load
|
||||
readonly loadInfo = (): void => {
|
||||
const info: ChatInfoFileContent | null = this.storageModel.readStringifiable(
|
||||
let info: ChatInfoFileContent | null = this.storageModel.readStringifiable(
|
||||
this.getInfoPath(),
|
||||
ChatInfoReference,
|
||||
);
|
||||
this.info = (info || ChatModel.generateChatInfo("0", "0", Colors.Standard));
|
||||
this.storeInfo();
|
||||
};
|
||||
|
||||
readonly handleInfo = (info: ChatInfoFileContent): void => {
|
||||
|
||||
@@ -67,6 +67,8 @@ export default class FileModel {
|
||||
};
|
||||
|
||||
readonly handleFileContent = (fileContent: FileContent<string>): void => {
|
||||
console.log(fileContent.type);
|
||||
|
||||
if (fileContent.type == "chat-info") {
|
||||
if (checkMatchesObjectStructure(fileContent, ChatInfoReference) == false) return;
|
||||
this.chatModel.handleInfo(fileContent as ChatInfoFileContent);
|
||||
|
||||
@@ -103,7 +103,7 @@ export default class FileTransferModel {
|
||||
};
|
||||
|
||||
readonly handleDecryptedFile = (data: string): void => {
|
||||
const parsed: any = parse(data);
|
||||
const parsed: any = parse(data);
|
||||
const isFileData: boolean = checkMatchesObjectStructure(
|
||||
parsed,
|
||||
FileDataReference,
|
||||
|
||||
@@ -224,7 +224,7 @@ export function parseValidObject<T>(string: string, reference: T): T | null {
|
||||
parsed,
|
||||
reference,
|
||||
);
|
||||
if (doesMatchReference == false) return null;
|
||||
if (doesMatchReference == false) return null;
|
||||
|
||||
return parsed;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user