Perform macro substitution while updating message.

This addresses 3 issues:
1. Prompt bias string was not removed from the text of the edited
  message.
2. Macro substitition was not performed in the prompt bias string.
3. Macro substitution was not performed in the edited message text.
This commit is contained in:
Deciare 2024-02-27 05:11:35 -05:00
parent 29c4334c46
commit 7885f19e86
1 changed files with 5 additions and 1 deletions

View File

@ -5967,7 +5967,11 @@ function updateMessage(div) {
text = text.trim();
}
const bias = extractMessageBias(text);
const bias = substituteParams(extractMessageBias(text));
text = substituteParams(text);
if (bias) {
text = removeMacros(text);
}
mes['mes'] = text;
if (mes['swipe_id'] !== undefined) {
mes['swipes'][mes['swipe_id']] = text;