Keep new message process in messagesProcess

This commit is contained in:
NicolasCantu 2025-01-15 13:24:55 +01:00
parent 6cf04f8cc8
commit bd039ee238

View File

@ -414,8 +414,11 @@ class ChatElement extends HTMLElement {
if (messagesProcess === null) { if (messagesProcess === null) {
console.log('Create a new child process'); console.log('Create a new child process');
// We need to create a new process // We need to create a new process
let newProcess;
try { try {
const res = await service.createDmProcess(member, this.processId); const res = await service.createDmProcess(member, this.processId);
// We catch the new process here
messagesProcess = res.updated_process.current_process;
await service.handleApiReturn(res); await service.handleApiReturn(res);
} catch (e) { } catch (e) {
console.error(e); console.error(e);