| 3129 | const character = characters.find(x => x.avatar === name) ?? characters.find(x => x.name === name); | 3130 | const character = characters.find(x => x.avatar === name) ?? characters.find(x => x.name === name); |
| 3130 | let force_avatar, original_avatar; | 3131 | let force_avatar, original_avatar; |
| 3131 | | 3132 | |
| 3132 | if (this_chid !== undefined && characters[this_chid] === character) { | 3133 | const chatCharacter = this_chid !== null ? characters[this_chid] : null; |
| | 3134 | const isNeutralCharacter = !chatCharacter && name2 === neutralCharacterName; |
| | 3135 | |
| | 3136 | if (chatCharacter === character || isNeutralCharacter) { |
| 3133 | // If the targeted character is the currently selected one in a solo chat, we don't need to force any avatars | 3137 | // If the targeted character is the currently selected one in a solo chat, we don't need to force any avatars |
| 3134 | } | 3138 | } |
| 3135 | else if (character && character.avatar !== 'none') { | 3139 | else if (character && character.avatar !== 'none') { |