diff --git a/assets/js/pages/conversations/conversation.js b/assets/js/pages/conversations/conversation.js index 263cf20e..30483a65 100644 --- a/assets/js/pages/conversations/conversation.js +++ b/assets/js/pages/conversations/conversation.js @@ -621,4 +621,15 @@ document.addEventListener("updatedConvMessage", (e) => { }); 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() }) \ No newline at end of file