diff --git a/front/volume/src/App.svelte b/front/volume/src/App.svelte index 836ef45..e90e99d 100644 --- a/front/volume/src/App.svelte +++ b/front/volume/src/App.svelte @@ -113,7 +113,7 @@ DMChannel = await res.json(); if (DMChannel.length != 0) chan.selectChat(DMChannel[0].id); - } else { + } else { console.log("Creating DMChannel: " + $store.username + "&" + DMUsername) fetch(API_URL + "/channels", { credentials: "include", diff --git a/front/volume/src/components/Chat.svelte b/front/volume/src/components/Chat.svelte index 3085106..5a476e1 100644 --- a/front/volume/src/components/Chat.svelte +++ b/front/volume/src/components/Chat.svelte @@ -81,7 +81,7 @@ const dispatch = createEventDispatcher(); let showProfileMenu = false; - let selectedUser = null; + let selectedUser: string | null = null; function openProfile(username: string) { showProfileMenu = true; selectedUser = username; @@ -301,7 +301,12 @@ } } + function onSendMessage() { + dispatch("send-message", selectedUser); + showProfileMenu = false; + } +
@@ -328,7 +333,7 @@ >
  • -