Insert group chat history with splice

This commit is contained in:
Cohee 2024-04-21 21:12:41 +03:00
parent 842b463e60
commit e832af9854
1 changed files with 1 additions and 3 deletions

View File

@ -188,9 +188,7 @@ export async function getGroupChat(groupId, reload = false) {
if (Array.isArray(data) && data.length) {
data[0].is_group = true;
for (let key of data) {
chat.push(key);
}
chat.splice(0, chat.length, ...data);
await printMessages();
} else {
sendSystemMessage(system_message_types.GROUP, '', { isSmallSys: true });