From 4b351c8ccc5684b07e828f40d538f4f6376b51f1 Mon Sep 17 00:00:00 2001 From: Redweller <76915580+redweller@users.noreply.github.com> Date: Wed, 17 May 2023 23:29:32 +0300 Subject: [PATCH] fix characters fetch on gm load --- js/base-chat.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/js/base-chat.js b/js/base-chat.js index 72782d03..0cc582a1 100644 --- a/js/base-chat.js +++ b/js/base-chat.js @@ -693,8 +693,8 @@ function baseChat () { d20plus.chat.processIncomingMsg = (msg, msgData) => { if (msg.listenerid?.language && d20plus.cfg.getOrDefault("chat", "languages")) { const speech = msg.listenerid; - const inKnownLanguage = hasLanguageProficiency(speech.languageid); - if (window.is_gm || msgData.from_me || inKnownLanguage) { + const inKnownLanguage = window.is_gm || hasLanguageProficiency(speech.languageid); + if (msgData.from_me || inKnownLanguage) { const translated = speech.message.replace(/\n/g, "
").replace(/ --([^ ^-])/g, " $1"); msg.content += `
(${speech.language}) ${translated}`; @@ -906,7 +906,7 @@ function baseChat () { const openedMacroId = $(target).closest(`[data-macroid]`).data("macroid"); d20plus.engine.enhanceMacros(openedMacroId); }); - availableLanguagesPlayer(); + is_gm || availableLanguagesPlayer(); buildLanguageIndex(); if (window.is_gm) {