| 3138 | const isSystem = bias && !removeMacros(mesText).length; | 3138 | const isSystem = bias && !removeMacros(mesText).length; |
| 3139 | const compact = isTrueBoolean(args?.compact); | 3139 | const compact = isTrueBoolean(args?.compact); |
| 3140 | | 3140 | |
| 3141 | const character = characters.find(x => x.avatar === name) ?? characters.find(x => x.name === name); | | |
| 3142 | let force_avatar, original_avatar; | | |
| 3143 | | | |
| 3144 | const chatCharacter = this_chid !== undefined ? characters[this_chid] : null; | 3141 | const chatCharacter = this_chid !== undefined ? characters[this_chid] : null; |
| 3145 | const isNeutralCharacter = !chatCharacter && name2 === neutralCharacterName && name === neutralCharacterName; | 3142 | const isNeutralCharacter = !chatCharacter && name2 === neutralCharacterName && name === neutralCharacterName; |
| 3146 | | 3143 | |
| | 3144 | const character = chatCharacter.name === name ? chatCharacter : characters.find(x => x.name === name); |
| | 3145 | let force_avatar, original_avatar; |
| | 3146 | |
| 3147 | if (chatCharacter === character || isNeutralCharacter) { | 3147 | if (chatCharacter === character || isNeutralCharacter) { |
| 3148 | // If the targeted character is the currently selected one in a solo chat, we don't need to force any avatars | 3148 | // If the targeted character is the currently selected one in a solo chat, we don't need to force any avatars |
| 3149 | } | 3149 | } |