Don't replace message text if displaying a different text.
Closes #2696
This commit is contained in:
parent
7d2e35d950
commit
86ec1fdd40
|
@ -1879,8 +1879,12 @@ export function messageFormatting(mes, ch_name, isSystem, isUser, messageId) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Number(messageId) === 0 && !isSystem && !isUser) {
|
if (Number(messageId) === 0 && !isSystem && !isUser) {
|
||||||
|
const mesBeforeReplace = mes;
|
||||||
|
const chatMessage = chat[messageId];
|
||||||
mes = substituteParams(mes, undefined, ch_name);
|
mes = substituteParams(mes, undefined, ch_name);
|
||||||
chat[messageId] && (chat[messageId].mes = mes);
|
if (chatMessage && chatMessage.mes === mesBeforeReplace && chatMessage.extra?.display_text !== mesBeforeReplace) {
|
||||||
|
chatMessage.mes = mes;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
mesForShowdownParse = mes;
|
mesForShowdownParse = mes;
|
||||||
|
|
Loading…
Reference in New Issue