Merge pull request #281 from bfs15/dev

hotfix on emtpy content: Was unable to open a certain chat without this
This commit is contained in:
Cohee
2023-05-12 10:18:39 +03:00
committed by GitHub

View File

@@ -1183,6 +1183,10 @@ function scrollChatToBottom() {
function substituteParams(content, _name1, _name2) {
_name1 = _name1 ?? name1;
_name2 = _name2 ?? name2;
if (!content) {
console.warn("No content on substituteParams")
return ''
}
content = content.replace(/{{user}}/gi, _name1);
content = content.replace(/{{char}}/gi, _name2);