mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
fix retrieval of currentChatID for renamed chars
This commit is contained in:
@@ -597,11 +597,12 @@ function reloadMarkdownProcessor(render_formulas = false) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function getCurrentChatId() {
|
function getCurrentChatId() {
|
||||||
|
console.debug(`selectedGroup:${selected_group}, this_chid:${this_chid}`)
|
||||||
if (selected_group) {
|
if (selected_group) {
|
||||||
return groups.find(x => x.id == selected_group)?.chat_id;
|
return groups.find(x => x.id == selected_group)?.chat_id;
|
||||||
}
|
}
|
||||||
else if (this_chid) {
|
else if (this_chid) {
|
||||||
return characters[this_chid].chat;
|
return characters[this_chid]?.chat;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user