getContext: Simplify chatId access

This commit is contained in:
Cohee
2024-12-06 21:41:04 +02:00
parent 0da4590597
commit 192a1f4014

View File

@@ -80,7 +80,7 @@ export function getContext() {
groupId: selected_group,
chatId: selected_group
? groups.find(x => x.id == selected_group)?.chat_id
: (this_chid && characters[this_chid] && characters[this_chid].chat),
: (characters[this_chid]?.chat),
getCurrentChatId,
getRequestHeaders,
reloadCurrentChat,