diff --git a/back/volume/src/chat/chat.gateway.ts b/back/volume/src/chat/chat.gateway.ts index f645561..c3c08d2 100644 --- a/back/volume/src/chat/chat.gateway.ts +++ b/back/volume/src/chat/chat.gateway.ts @@ -61,7 +61,8 @@ export class ChatGateway implements OnGatewayConnection, OnGatewayDisconnect { ) { throw new WsException('Wrong password') } - } else await this.chatService.addUserToChannel(channel, user) + } + await this.chatService.addUserToChannel(channel, user) const messages = await this.messageService.findMessagesInChannelForUser( channel, user @@ -93,6 +94,7 @@ export class ChatGateway implements OnGatewayConnection, OnGatewayDisconnect { const connect = await this.connectedUserRepository.findOneBy({ socket: socket.id }) + console.log("connection removed", connect?.user) if (connect == null) return const channel = await this.chatService.getFullChannel(connect.channel) socket.disconnect() diff --git a/back/volume/src/users/entity/user.entity.ts b/back/volume/src/users/entity/user.entity.ts index 077184e..ca9eef6 100644 --- a/back/volume/src/users/entity/user.entity.ts +++ b/back/volume/src/users/entity/user.entity.ts @@ -1,4 +1,5 @@ -import { Entity, +import { + Entity, PrimaryGeneratedColumn, Column, ManyToMany, diff --git a/front/volume/src/App.svelte b/front/volume/src/App.svelte index b72994f..98d6859 100644 --- a/front/volume/src/App.svelte +++ b/front/volume/src/App.svelte @@ -14,6 +14,7 @@