mirror of
https://github.com/pierre42100/ComunicWeb
synced 2024-11-22 20:19:21 +00:00
Fix message updated event
This commit is contained in:
parent
417b8a6600
commit
4a02338d38
@ -677,8 +677,8 @@ ComunicWeb.pages.conversations.conversation = ConversationPageConvPart;
|
|||||||
document.addEventListener("newConvMessage", (e) => {
|
document.addEventListener("newConvMessage", (e) => {
|
||||||
const msg = e.detail;
|
const msg = e.detail;
|
||||||
|
|
||||||
if (ComunicWeb.pages.conversations.conversation._conv_info.id == msg.conv_id)
|
if (ConversationPageConvPart._conv_info.id == msg.conv_id)
|
||||||
ComunicWeb.pages.conversations.conversation.applyMessages([msg]);
|
ConversationPageConvPart.applyMessages([msg]);
|
||||||
})
|
})
|
||||||
|
|
||||||
// Register to message update events
|
// Register to message update events
|
||||||
@ -700,7 +700,7 @@ document.addEventListener("updatedConvMessage", async (e) => {
|
|||||||
//Parse message content
|
//Parse message content
|
||||||
ComunicWeb.components.textParser.parse({
|
ComunicWeb.components.textParser.parse({
|
||||||
element: newMessageContent,
|
element: newMessageContent,
|
||||||
user: await userInfo(msg.ID_user)
|
user: await userInfo(msg.user_id)
|
||||||
});
|
});
|
||||||
|
|
||||||
target.replaceWith(newMessageContent)
|
target.replaceWith(newMessageContent)
|
||||||
|
Loading…
Reference in New Issue
Block a user