Register correctly to events

This commit is contained in:
Pierre HUBERT 2021-03-05 17:52:58 +01:00
parent ff4d5ae344
commit 90e333baf0

View File

@ -619,7 +619,7 @@ ComunicWeb.pages.conversations.conversation = ConversationPageConvPart;
document.addEventListener("newConvMessage", (e) => {
const msg = e.detail;
if(ComunicWeb.pages.conversations.conversation._conv_info.id == msg.convID)
if (ComunicWeb.pages.conversations.conversation._conv_info.id == msg.conv_id)
ComunicWeb.pages.conversations.conversation.applyMessages([msg]);
})
@ -627,7 +627,7 @@ document.addEventListener("newConvMessage", (e) => {
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;