Remove chat save on pick macro
This commit is contained in:
parent
82a30b6ba5
commit
b027c04066
|
@ -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);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue