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);