Skip to content
This repository has been archived by the owner on Dec 2, 2024. It is now read-only.

Commit

Permalink
make it so it doent look like you added yourself again
Browse files Browse the repository at this point in the history
  • Loading branch information
showierdata9978 committed Dec 13, 2023
1 parent c358a4f commit ec555fd
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/pages/invite/[invite].svelte
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,12 @@
let data = await response.json();
// Cursed code because the server does not seem to want to send a packet
$chats.findLast(
let chat = $chats.findLast(
chat => chat._id === data.chat
).members.push($user.name);
)
if (chat.members.indexOf($user.name) === -1) chat.members.push($user.name);
$goto(`/chats/${data.chat}`);
})();
});
Expand Down

0 comments on commit ec555fd

Please sign in to comment.