mirror of
https://github.com/pierre42100/ComunicWeb
synced 2024-12-24 09:58:51 +00:00
Propagate message deletion to conversations page
This commit is contained in:
parent
a6ca315a37
commit
3833e46ba8
@ -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()
|
||||
})
|
Loading…
Reference in New Issue
Block a user