From 10a23012f3cefa676db1429d3e78db4081d69750 Mon Sep 17 00:00:00 2001 From: Wolfsblvt Date: Tue, 10 Sep 2024 18:46:38 +0200 Subject: [PATCH] Fix /sendas not needed to enforce avatar - Fixes #2820 --- public/scripts/slash-commands.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/public/scripts/slash-commands.js b/public/scripts/slash-commands.js index aa494c366..f018e5f9b 100644 --- a/public/scripts/slash-commands.js +++ b/public/scripts/slash-commands.js @@ -3129,7 +3129,10 @@ export async function sendMessageAs(args, text) { const character = characters.find(x => x.avatar === name) ?? characters.find(x => x.name === name); let force_avatar, original_avatar; - if (character && character.avatar !== 'none') { + if (characters[this_chid] === character) { + // If the targeted character is the currently selected one in a solo chat, we don't need to force any avatars + } + else if (character && character.avatar !== 'none') { force_avatar = getThumbnailUrl('avatar', character.avatar); original_avatar = character.avatar; }