From 4a76221f07fa760ddf16463676dbcfc99eafe6d4 Mon Sep 17 00:00:00 2001 From: Vincent Vandemeulebrouck Date: Sun, 14 Mar 2021 19:05:42 +0100 Subject: [PATCH] =?UTF-8?q?Choisir=20un=20GM=20connect=C3=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Pour le cas où 2 GM sont définis, éviter de passer par un GM inactif --- module/chat-utility.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/module/chat-utility.js b/module/chat-utility.js index d38514ca..b4ac3414 100644 --- a/module/chat-utility.js +++ b/module/chat-utility.js @@ -17,12 +17,11 @@ export class ChatUtility { const toDelete = game.messages.filter(it => it.data.content.includes(part)); toDelete.forEach(it => it.delete()); } - - } + } /* -------------------------------------------- */ static removeChatMessageContaining(part) { - const gmId = game.user.isGM ? game.user._id : game.users.entities.find(u => u.isGM)?.id; + const gmId = game.user.isGM ? game.user._id : game.users.entities.find(u => u.isGM && u.active)?.id; if (!gmId || game.user.isGM) { ChatUtility.onRemoveMessages(part, game.user._id);