Remove chat save on pick macro

This commit is contained in:
Wolfsblvt 2024-04-07 20:37:05 +02:00
parent 82a30b6ba5
commit b027c04066
1 changed files with 2 additions and 2 deletions

View File

@ -189,10 +189,10 @@ function pickReplace(input, rawContent, emptyListPlaceholder = '') {
const pickPattern = /{{pick\s?::?([^}]+)}}/gi; const pickPattern = /{{pick\s?::?([^}]+)}}/gi;
// We need to have a consistent chat hash, otherwise we'll lose rolls on chat file rename or branch switches // We need to have a consistent chat hash, otherwise we'll lose rolls on chat file rename or branch switches
// No need to save metadata here - branching and renaming will implicitly do the save for us, and until then loading it like this is consistent
const chatIdHash = chat_metadata['chat_id_hash']; const chatIdHash = chat_metadata['chat_id_hash'];
if (!chatIdHash) { if (!chatIdHash) {
chat_metadata['chat_id_hash'] = getStringHash(getCurrentChatId()); chat_metadata['chat_id_hash'] = getStringHash(chat_metadata['main_chat'] ?? getCurrentChatId());
saveMetadataDebounced();
} }
const rawContentHash = getStringHash(rawContent); const rawContentHash = getStringHash(rawContent);