From 90e333baf0a5927d0cca5e9dd7477d0a00040bc5 Mon Sep 17 00:00:00 2001 From: Pierre HUBERT Date: Fri, 5 Mar 2021 17:52:58 +0100 Subject: [PATCH] Register correctly to events --- assets/js/pages/conversations/conversation.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/assets/js/pages/conversations/conversation.js b/assets/js/pages/conversations/conversation.js index 858338cd..9514aa4d 100644 --- a/assets/js/pages/conversations/conversation.js +++ b/assets/js/pages/conversations/conversation.js @@ -619,15 +619,15 @@ ComunicWeb.pages.conversations.conversation = ConversationPageConvPart; document.addEventListener("newConvMessage", (e) => { const msg = e.detail; - if(ComunicWeb.pages.conversations.conversation._conv_info.id == msg.convID) - ComunicWeb.pages.conversations.conversation.applyMessages([msg]); + if (ComunicWeb.pages.conversations.conversation._conv_info.id == msg.conv_id) + ComunicWeb.pages.conversations.conversation.applyMessages([msg]); }) // Register to message update events document.addEventListener("updatedConvMessage", async (e) => { const msg = e.detail; - const target = document.querySelector("[data-chatpage-msg-text-id='"+msg.ID+"'] .txt") + const target = document.querySelector("[data-chatpage-msg-text-id='"+msg.id+"'] .txt") if(!target) return;