diff --git a/backend/src/Room.ts b/backend/src/Room.ts index 3f04f4b..f22a8fa 100644 --- a/backend/src/Room.ts +++ b/backend/src/Room.ts @@ -39,6 +39,7 @@ export default class Room { 'timelineName': this.timelineName, 'seekTime': this.seekTime, 'readyToParticipate': user.readyToParticipate || this.leader == user, + 'speedFactor': this.speedFactor } } diff --git a/backend/src/Service.ts b/backend/src/Service.ts index a31789d..8a5456e 100644 --- a/backend/src/Service.ts +++ b/backend/src/Service.ts @@ -55,7 +55,6 @@ export default class Service { onRequestJoin(socket: Socket, roomId: number): boolean { let user = this.getUser(socket); - if (!this.roomIdToRooms.has(roomId)) return false; if (user.room && user.room.id == roomId) return false; if (user.room) { @@ -63,6 +62,10 @@ export default class Service { this.deleteEmptyRooms(); } + if (!this.roomIdToRooms.has(roomId)) { + this.createRoomWithId(roomId); + } + let room = this.roomIdToRooms.get(roomId)!!; room.join(user); diff --git a/frontend/src/components/FeedItem.tsx b/frontend/src/components/FeedItem.tsx index d906719..bbbc881 100644 --- a/frontend/src/components/FeedItem.tsx +++ b/frontend/src/components/FeedItem.tsx @@ -2,7 +2,7 @@ import React, {PureComponent} from 'react'; import {TimestampEvent} from "../types/types"; -import '../css/feeditem.sass' +import '../css/feed.sass' import shot from "../img/shot.png"; import song from "../img/song.png"; import talk from "../img/talk.png"; @@ -14,7 +14,6 @@ const images = { class FeedItem extends PureComponent<{item: TimestampEvent}> { render() { - // console.log('feeditem render'); return (
diff --git a/frontend/src/components/Lobby.tsx b/frontend/src/components/Lobby.tsx index ba5609d..1bb0863 100644 --- a/frontend/src/components/Lobby.tsx +++ b/frontend/src/components/Lobby.tsx @@ -105,7 +105,7 @@ const Lobby = (props: any) => {

We gaan luisteren naar {room && room.timelineName} en {room?.running && zijn al gestart!} - {!room?.running && starten op {room?.seekTime} seconden} + {!room?.running && starten op {(room?.seekTime || 0) / 1000} seconden}