Check for avatar file name match in sendas

This commit is contained in:
Cohee 2024-07-01 13:44:01 +00:00
parent bdc7177b61
commit 2ff1d600fc
1 changed files with 1 additions and 1 deletions

View File

@ -2762,7 +2762,7 @@ export async function sendMessageAs(args, text) {
const isSystem = bias && !removeMacros(mesText).length; const isSystem = bias && !removeMacros(mesText).length;
const compact = isTrueBoolean(args?.compact); const compact = isTrueBoolean(args?.compact);
const character = characters.find(x => x.name === name); const character = characters.find(x => x.avatar === name) ?? characters.find(x => x.name === name);
let force_avatar, original_avatar; let force_avatar, original_avatar;
if (character && character.avatar !== 'none') { if (character && character.avatar !== 'none') {