From 6a85073dbb809fe880d73e796d31d52237aef0b4 Mon Sep 17 00:00:00 2001 From: Vincent Vandemeulebrouck Date: Thu, 27 May 2021 01:47:18 +0200 Subject: [PATCH] fix: suppression message par MJ Ne pas passer par un socket pour le user qui va traiter le message --- module/chat-utility.js | 5 +++++ module/rdd-utility.js | 1 - 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/module/chat-utility.js b/module/chat-utility.js index 1a51e194..06eb5fac 100644 --- a/module/chat-utility.js +++ b/module/chat-utility.js @@ -26,7 +26,12 @@ export class ChatUtility { } static removeMessages(data) { + if (Misc.isElectedUser()){ + ChatUtility.onRemoveMessages(data); + } + else { game.socket.emit("system.foundryvtt-reve-de-dragon", { msg: "msg_delete_chat_message", data: data }); + } } /* -------------------------------------------- */ diff --git a/module/rdd-utility.js b/module/rdd-utility.js index d981ecb9..de4da058 100644 --- a/module/rdd-utility.js +++ b/module/rdd-utility.js @@ -547,7 +547,6 @@ export class RdDUtility { /* -------------------------------------------- */ static onSocketMesssage(sockmsg) { - console.log(">>>>> MSG RECV", sockmsg); switch (sockmsg.msg) { case "msg_gm_chat_message": return ChatUtility.handleGMChatMessage(sockmsg.data);