Insert messages to chat load with splice

This commit is contained in:
Cohee 2024-04-20 02:44:19 +03:00
parent be874f55c4
commit 33ea3344ff
1 changed files with 1 additions and 1 deletions

View File

@ -5654,7 +5654,7 @@ async function getChat() {
contentType: 'application/json',
});
if (response[0] !== undefined) {
chat.push(...response);
chat.splice(0, chat.length, ...response);
chat_create_date = chat[0]['create_date'];
chat_metadata = chat[0]['chat_metadata'] ?? {};