mirror of
https://github.com/pierre42100/ComunicWeb
synced 2024-11-26 13:59:23 +00:00
Can delete again messages
This commit is contained in:
parent
92a8c90c1f
commit
ba2c21bf54
@ -206,7 +206,7 @@ class UserWebSocket {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case "deleted_conv_message":
|
case "deleted_conv_message":
|
||||||
SendEvent("deletedConvMessage", msg.data.ID);
|
SendEvent("deletedConvMessage", msg.data.id);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "new_comment":
|
case "new_comment":
|
||||||
|
@ -656,7 +656,7 @@ const ConversationPageConvPart = {
|
|||||||
});
|
});
|
||||||
|
|
||||||
//Scroll to newest message
|
//Scroll to newest message
|
||||||
let el = document.querySelector("[data-chatpage-msg-text-id=\""+response[0].ID+"\"]")
|
let el = document.querySelector("[data-chatpage-msg-text-id=\""+response[0].id+"\"]")
|
||||||
if(el) {
|
if(el) {
|
||||||
el = el.parentNode
|
el = el.parentNode
|
||||||
/** @type {HTMLDivElement} */
|
/** @type {HTMLDivElement} */
|
||||||
@ -710,7 +710,7 @@ document.addEventListener("updatedConvMessage", async (e) => {
|
|||||||
document.addEventListener("deletedConvMessage", (e) => {
|
document.addEventListener("deletedConvMessage", (e) => {
|
||||||
const msgID = e.detail;
|
const msgID = e.detail;
|
||||||
|
|
||||||
const target = document.querySelector("[data-chatpage-msg-text-id='"+msgID+"']")
|
const target = document.querySelector("[data-chatpage-msg-text-id='"+msgID+"']");
|
||||||
if(!target)
|
if(!target)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user