diff --git a/src/pages/chat/chat.ts b/src/pages/chat/chat.ts index 3f2d897..bbcc18f 100755 --- a/src/pages/chat/chat.ts +++ b/src/pages/chat/chat.ts @@ -1045,7 +1045,16 @@ class ChatElement extends HTMLElement { const li = document.createElement('li'); li.className = 'group-list-item'; const oneProcess = process.states[0].commited_in; - const roles = process.states[0].encrypted_pcd.roles; + let roles; + try { + roles = await this.getRoles(process); + if (!roles) { + roles = await process.states[0].encrypted_pcd.roles; + } + } catch (e) { + // console.error('Failed to get roles for process:', process); + continue; + } // Si le processus est dans notre Set, ajouter la classe my-process if (this.userProcessSet && this.userProcessSet.has(oneProcess)) {