From ae0a83161d4844422f797f07b291c91d0499bdea Mon Sep 17 00:00:00 2001 From: SillyLossy Date: Thu, 20 Apr 2023 14:24:06 +0300 Subject: [PATCH] Remove the memory attached to right swipe --- public/script.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/public/script.js b/public/script.js index ee41d9b48..a89536eae 100644 --- a/public/script.js +++ b/public/script.js @@ -3499,6 +3499,10 @@ $(document).ready(function () { chat[chat.length - 1]['swipes'][0] = chat[chat.length - 1]['mes']; //assign swipe array with last message from chat } chat[chat.length - 1]['swipe_id']++; //make new slot in array + // if message has memory attached - remove it to allow regen + if (chat[chat.length -1].extra && chat[chat.length -1].extra.memory) { + delete chat[chat.length -1].extra.memory; + } //console.log(chat[chat.length-1]['swipes']); if (parseInt(chat[chat.length - 1]['swipe_id']) === chat[chat.length - 1]['swipes'].length) { //if swipe id of last message is the same as the length of the 'swipes' array