fix: sync swipes only when chat is not pristine to ensure macro resolution (#5106)

bee4d9a8183f4aecf326b8d6e2b1d9cfdca96dd3

Cohee <18619528+Cohee1207@users.noreply.github.com>

Signed
1 files changed, +4 -1Ignore whitespace
public/script.js+4 -1
@@ -6708,7 +6708,10 @@ export function syncMesToSwipe(messageId = null) {
67086708 return false;
67096709 }
67106710
6711- targetMessage.swipes[targetMessage.swipe_id] = targetMessage.mes;
6711+ // Only sync swipes if the chat is not pristine, so that macros in the greeting can resolve again on swipe
6712+ if (chat_metadata.tainted || chat.length > 1) {
6713+ targetMessage.swipes[targetMessage.swipe_id] = targetMessage.mes;
6714+ }
67126715
67136716 targetSwipeInfo.send_date = targetMessage.send_date;
67146717 targetSwipeInfo.gen_started = targetMessage.gen_started;