[bug] Add processes as arg for parse_cipher

This commit is contained in:
Sosthene 2025-08-25 01:10:43 +02:00
parent 45a1478210
commit 6cd7fe3204

View File

@ -542,8 +542,9 @@ export class Service {
async parseCipher(message: string): Promise<void> {
const membersList = this.getAllMembers();
const processes = Object.fromEntries(this.getProcesses());
try {
const apiReturn = wasm.parse_cipher(message, membersList);
const apiReturn = wasm.parse_cipher(message, membersList, processes);
await this.handleApiReturn(apiReturn);
} catch (e) {
console.error(`Failed to parse cipher: ${e}`);
@ -708,8 +709,11 @@ export class Service {
}
}
// Database method: Get All Processes
async getAllProcesses(): Promise<Record<string, any>> {
public getProcesses(): Map<string, Process> {
return this.processes;
}
async getAllProcessesFromDb(): Promise<Record<string, any>> {
try {
const db = await Database.getInstance();
const processes = await db.dumpStore('processes');