diff --git a/src/pages/chat/chat.ts b/src/pages/chat/chat.ts index 88f354c..5338c01 100755 --- a/src/pages/chat/chat.ts +++ b/src/pages/chat/chat.ts @@ -37,6 +37,11 @@ export function initChat() { } class ChatElement extends HTMLElement { + static get observedAttributes() { + return ['process-id']; + } + + private processId: string | null = null; private selectedMemberId: string | null = null; private messagesMock: any[] = []; private dom: Node; @@ -58,6 +63,10 @@ class ChatElement extends HTMLElement { this.messagesMock = messageStore.getMessages(); this.dom = getCorrectDOM('signature-element'); + // Récupérer le processId depuis l'attribut du composant + this.processId = this.getAttribute('process-id'); + console.log('🔍 Constructor - Process ID from element:', this.processId); + this.shadowRoot!.innerHTML = `