Group chat creation fixed

This commit is contained in:
SillyLossy
2023-04-09 01:11:57 +03:00
parent d59e1880f0
commit 34994ebff5
2 changed files with 2 additions and 2 deletions

View File

@@ -109,6 +109,7 @@ async function getGroupChat(id) {
if (response.ok) {
const data = await response.json();
const group = groups.find((x) => x.id === id);
if (Array.isArray(data) && data.length) {
data[0].is_group = true;
for (let key of data) {
@@ -144,7 +145,6 @@ async function getGroupChat(id) {
}
}
const group = groups.find((x) => x.id === id);
if (group) {
let metadata = group.chat_metadata ?? {};
updateChatMetadata(metadata, true);