Fix: boucle infinie de messages

en cas d'appel de ChatUtility.onRemoveMessages par un joueur,
on entre en boucle infinie de messages envoyés sur les sockets
This commit is contained in:
Vincent Vandemeulebrouck 2021-05-27 00:19:31 +02:00
parent d610a92003
commit c77d5e3c93

View File

@ -23,19 +23,19 @@ export class ChatUtility {
game.messages.get(data.messageId)?.delete();
}
}
else {
game.socket.emit("system.foundryvtt-reve-de-dragon", { msg: "msg_delete_chat_message", data: data });
}
}
static removeMessages(data) {
game.socket.emit("system.foundryvtt-reve-de-dragon", { msg: "msg_delete_chat_message", data: data });
}
/* -------------------------------------------- */
static removeChatMessageContaining(part) {
ChatUtility.onRemoveMessages({ part: part });
ChatUtility.removeMessages({ part: part });
}
static removeChatMessageId(messageId) {
ChatUtility.onRemoveMessages({ messageId: messageId });
ChatUtility.removeMessages({ messageId: messageId });
}
/* -------------------------------------------- */