diff --git a/public/scripts/world-info.js b/public/scripts/world-info.js index 1ec51b112..89e16be83 100644 --- a/public/scripts/world-info.js +++ b/public/scripts/world-info.js @@ -506,16 +506,18 @@ function checkWorldInfo(chat) { if (Array.isArray(entry.key) && entry.key.length) { primary: for (let key of entry.key) { - if (key && textToScan.includes(key.trim().toLowerCase())) { + const substituted = substituteParams(key); + if (substituted && textToScan.includes(substituted.trim().toLowerCase())) { if ( entry.selective && Array.isArray(entry.keysecondary) && entry.keysecondary.length ) { secondary: for (let keysecondary of entry.keysecondary) { + const secondarySubstituted = substituteParams(keysecondary); if ( - keysecondary && - textToScan.includes(keysecondary.trim().toLowerCase()) + secondarySubstituted && + textToScan.includes(secondarySubstituted.trim().toLowerCase()) ) { activatedNow.add(entry.uid); break secondary; @@ -685,4 +687,4 @@ $(document).ready(() => { world_info_recursive = !!$(this).prop('checked'); saveSettingsDebounced(); }) -}); \ No newline at end of file +});