fix: suppression message par MJ

Ne pas passer par un socket pour le user qui va traiter le message
This commit is contained in:
Vincent Vandemeulebrouck 2021-05-27 01:47:18 +02:00
parent bd7f3a9b3d
commit 6a85073dbb
2 changed files with 5 additions and 1 deletions

View File

@ -26,7 +26,12 @@ export class ChatUtility {
} }
static removeMessages(data) { 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 }); game.socket.emit("system.foundryvtt-reve-de-dragon", { msg: "msg_delete_chat_message", data: data });
}
} }
/* -------------------------------------------- */ /* -------------------------------------------- */

View File

@ -547,7 +547,6 @@ export class RdDUtility {
/* -------------------------------------------- */ /* -------------------------------------------- */
static onSocketMesssage(sockmsg) { static onSocketMesssage(sockmsg) {
console.log(">>>>> MSG RECV", sockmsg);
switch (sockmsg.msg) { switch (sockmsg.msg) {
case "msg_gm_chat_message": case "msg_gm_chat_message":
return ChatUtility.handleGMChatMessage(sockmsg.data); return ChatUtility.handleGMChatMessage(sockmsg.data);