Propagate message deletion to conversations page

This commit is contained in:
Pierre HUBERT 2020-04-03 09:09:17 +02:00
parent a6ca315a37
commit 3833e46ba8

View File

@ -622,3 +622,14 @@ document.addEventListener("updatedConvMessage", (e) => {
target.replaceWith(newMessageContent) target.replaceWith(newMessageContent)
}) })
// Register to conversation message deletion event
document.addEventListener("deletedConvMessage", (e) => {
const msgID = e.detail;
const target = document.querySelector("[data-chatpage-msg-text-id='"+msgID+"']")
if(!target)
return;
target.parentNode.remove()
})